diff options
Diffstat (limited to 'src/common/mac')
-rw-r--r-- | src/common/mac/dump_syms.cc | 18 | ||||
-rw-r--r-- | src/common/mac/dump_syms.h | 5 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/common/mac/dump_syms.cc b/src/common/mac/dump_syms.cc index fef489d0..5ebe3d2a 100644 --- a/src/common/mac/dump_syms.cc +++ b/src/common/mac/dump_syms.cc @@ -413,7 +413,7 @@ bool DumpSymbols::CreateEmptyModule(scoped_ptr<Module>& module) { return true; } -bool DumpSymbols::ReadDwarf(google_breakpad::Module *module, +void DumpSymbols::ReadDwarf(google_breakpad::Module *module, const mach_o::Reader &macho_reader, const mach_o::SectionMap &dwarf_sections, bool handle_inter_cu_refs) const { @@ -439,15 +439,14 @@ bool DumpSymbols::ReadDwarf(google_breakpad::Module *module, // Find the __debug_info section. dwarf2reader::SectionMap::const_iterator debug_info_entry = file_context.section_map().find("__debug_info"); - assert(debug_info_entry != file_context.section_map().end()); - const std::pair<const uint8_t *, uint64>& debug_info_section = - debug_info_entry->second; // There had better be a __debug_info section! - if (!debug_info_section.first) { + if (debug_info_entry == file_context.section_map().end()) { fprintf(stderr, "%s: __DWARF segment of file has no __debug_info section\n", selected_object_name_.c_str()); - return false; + return; } + const std::pair<const uint8_t*, uint64>& debug_info_section = + debug_info_entry->second; // Build a line-to-module loader for the root handler to use. DumperLineToModule line_to_module(&byte_reader); @@ -484,8 +483,6 @@ bool DumpSymbols::ReadDwarf(google_breakpad::Module *module, // Process the entire compilation unit; get the offset of the next. offset += dwarf_reader.Start(); } - - return true; } bool DumpSymbols::ReadCFI(google_breakpad::Module *module, @@ -598,10 +595,7 @@ bool DumpSymbols::LoadCommandDumper::SegmentCommand(const Segment &segment) { if (segment.name == "__DWARF") { if (symbol_data_ != ONLY_CFI) { - if (!dumper_.ReadDwarf(module_, reader_, section_map, - handle_inter_cu_refs_)) { - return false; - } + dumper_.ReadDwarf(module_, reader_, section_map, handle_inter_cu_refs_); } if (symbol_data_ != NO_CFI) { mach_o::SectionMap::const_iterator debug_frame diff --git a/src/common/mac/dump_syms.h b/src/common/mac/dump_syms.h index ab8a99d1..1e57f86d 100644 --- a/src/common/mac/dump_syms.h +++ b/src/common/mac/dump_syms.h @@ -141,9 +141,8 @@ class DumpSymbols { bool CreateEmptyModule(scoped_ptr<Module>& module); // Read debugging information from |dwarf_sections|, which was taken from - // |macho_reader|, and add it to |module|. On success, return true; - // on failure, report the problem and return false. - bool ReadDwarf(google_breakpad::Module *module, + // |macho_reader|, and add it to |module|. + void ReadDwarf(google_breakpad::Module *module, const mach_o::Reader &macho_reader, const mach_o::SectionMap &dwarf_sections, bool handle_inter_cu_refs) const; |