diff options
author | jimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-07-27 21:30:56 +0000 |
---|---|---|
committer | jimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-07-27 21:30:56 +0000 |
commit | 53cb8044fde30128b761bf20a86149a1a3487882 (patch) | |
tree | fcf1063e501f64eca68419be31ba77f6c2ca40ac /src/common/linux | |
parent | Use a std::map instead of a linear search to look up files for line records. (diff) | |
download | breakpad-53cb8044fde30128b761bf20a86149a1a3487882.tar.xz |
The 'no_next_addr_count' variable in ComputeSizeAndRVA shouldn't be static.
The current arrangement would produce needless warnings if
WriteSymbolFile were ever used twice in the same program invocation.
Even if it weren't wrong, it's unnecessary, and local non-const static
variables require extra care when reading to be sure of their effect.
A=jimblandy
R=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@363 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/linux')
-rw-r--r-- | src/common/linux/dump_symbols.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index 7f7cf608..a5533f17 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -444,6 +444,7 @@ static void AddIncludedFiles(struct SymbolInfo *symbols, // Compute size and rva information based on symbols loaded from stab section. static bool ComputeSizeAndRVA(ElfW(Addr) loading_addr, struct SymbolInfo *symbols) { + int no_next_addr_count = 0; std::vector<struct SourceFileInfo *> sorted_files = SortByAddress(&(symbols->source_file_info)); for (size_t i = 0; i < sorted_files.size(); ++i) { @@ -476,7 +477,6 @@ static bool ComputeSizeAndRVA(ElfW(Addr) loading_addr, // } // TODO(liuli): Find a better solution. static const int kDefaultSize = 0x10000000; - static int no_next_addr_count = 0; if (next_addr != 0) { func_info.size = next_addr - func_info.addr; } else { |