From bd0a7f9da10909927dfe91c9f1010d03d07f3b7b Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Fri, 25 Jun 2010 16:56:32 +0000 Subject: [PATCH] Breakpad DWARF support: Check for DWARF line info under Mac OS X section names. For some reason, Mac OS X places DWARF debugging information in sections whose names begin with "__", rather than the names beginning with "." given in the DWARF spec. This patch changes google_breakpad::DwarfCUToModule to look for line number information under both names. A=jimb R=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@612 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/dwarf_cu_to_module.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 3ac833ff..03206d22 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -619,6 +619,10 @@ void DwarfCUToModule::ReadSourceLines(uint64 offset) { = cu_context_->file_context->section_map; dwarf2reader::SectionMap::const_iterator map_entry = section_map.find(".debug_line"); + // Mac OS X puts DWARF data in sections whose names begin with "__" + // instead of ".". + if (map_entry == section_map.end()) + map_entry = section_map.find("__debug_line"); if (map_entry == section_map.end()) { cu_context_->reporter->MissingSection(".debug_line"); return;