diff options
Diffstat (limited to 'src/processor')
-rw-r--r-- | src/processor/basic_source_line_resolver.cc | 13 | ||||
-rw-r--r-- | src/processor/contained_range_map-inl.h | 2 | ||||
-rw-r--r-- | src/processor/minidump.cc | 2 | ||||
-rw-r--r-- | src/processor/simple_symbol_supplier.cc | 4 |
4 files changed, 17 insertions, 4 deletions
diff --git a/src/processor/basic_source_line_resolver.cc b/src/processor/basic_source_line_resolver.cc index e5d1bd7f..6baa1a8b 100644 --- a/src/processor/basic_source_line_resolver.cc +++ b/src/processor/basic_source_line_resolver.cc @@ -48,7 +48,9 @@ using std::map; using std::vector; using std::make_pair; +#ifndef BSLR_NO_HASH_MAP using __gnu_cxx::hash; +#endif // BSLR_NO_HASH_MAP namespace google_breakpad { @@ -116,7 +118,11 @@ class BasicSourceLineResolver::Module { private: friend class BasicSourceLineResolver; +#ifdef BSLR_NO_HASH_MAP + typedef map<int, string> FileMap; +#else // BSLR_NO_HASH_MAP typedef hash_map<int, string> FileMap; +#endif // BSLR_NO_HASH_MAP // The types for stack_info_. This is equivalent to MS DIA's // StackFrameTypeEnum. Each identifies a different type of frame @@ -594,8 +600,15 @@ bool BasicSourceLineResolver::Module::ParseStackInfo(char *stack_info_line) { return true; } +#ifdef BSLR_NO_HASH_MAP +bool BasicSourceLineResolver::CompareString::operator()( + const string &s1, const string &s2) const { + return strcmp(s1.c_str(), s2.c_str()) < 0; +} +#else // BSLR_NO_HASH_MAP size_t BasicSourceLineResolver::HashString::operator()(const string &s) const { return hash<const char*>()(s.c_str()); } +#endif // BSLR_NO_HASH_MAP } // namespace google_breakpad diff --git a/src/processor/contained_range_map-inl.h b/src/processor/contained_range_map-inl.h index 97f9fdbe..cf5ff235 100644 --- a/src/processor/contained_range_map-inl.h +++ b/src/processor/contained_range_map-inl.h @@ -70,7 +70,7 @@ bool ContainedRangeMap<AddressType, EntryType>::StoreRange( MapIterator iterator_base = map_->lower_bound(base); MapIterator iterator_high = map_->lower_bound(high); - MapConstIterator iterator_end = map_->end(); + MapIterator iterator_end = map_->end(); if (iterator_base == iterator_high && iterator_base != iterator_end && base >= iterator_base->second->base_) { diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc index 3548fb95..93d4eb05 100644 --- a/src/processor/minidump.cc +++ b/src/processor/minidump.cc @@ -106,7 +106,7 @@ static inline void Swap(u_int32_t* value) { } -static void Swap(u_int64_t* value) { +static inline void Swap(u_int64_t* value) { u_int32_t* value32 = reinterpret_cast<u_int32_t*>(value); Swap(&value32[0]); Swap(&value32[1]); diff --git a/src/processor/simple_symbol_supplier.cc b/src/processor/simple_symbol_supplier.cc index ca3805ce..df61e849 100644 --- a/src/processor/simple_symbol_supplier.cc +++ b/src/processor/simple_symbol_supplier.cc @@ -113,8 +113,8 @@ SymbolSupplier::SymbolResult SimpleSymbolSupplier::GetSymbolFileAtPath( string debug_file_extension; if (debug_file_name.size() > 4) debug_file_extension = debug_file_name.substr(debug_file_name.size() - 4); - transform(debug_file_extension.begin(), debug_file_extension.end(), - debug_file_extension.begin(), tolower); + std::transform(debug_file_extension.begin(), debug_file_extension.end(), + debug_file_extension.begin(), tolower); if (debug_file_extension == ".pdb") { path.append(debug_file_name.substr(0, debug_file_name.size() - 4)); } else { |