aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-06-25 16:56:32 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-06-25 16:56:32 +0000
commitbd0a7f9da10909927dfe91c9f1010d03d07f3b7b (patch)
treef8b09dd7093731e7a6ed1b6235147b11184c7472 /src/common/dwarf_cu_to_module.cc
parentBreakpad Mac dumper: Change the dumper to be more C++-ish. (diff)
downloadbreakpad-bd0a7f9da10909927dfe91c9f1010d03d07f3b7b.tar.xz
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
Diffstat (limited to 'src/common/dwarf_cu_to_module.cc')
-rw-r--r--src/common/dwarf_cu_to_module.cc4
1 files changed, 4 insertions, 0 deletions
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;