aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf_cu_to_module.cc
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2020-06-26 11:24:16 -0700
committerSterling Augustine <saugustine@google.com>2020-06-26 18:32:51 +0000
commitb6f36dd7757f5cdb460f7b2ccf4f646099a320af (patch)
tree2044f081ceabc560624471a73ea6eb80d65303e6 /src/common/dwarf_cu_to_module.cc
parentRead dwarf5 compilation unit headers. (diff)
downloadbreakpad-b6f36dd7757f5cdb460f7b2ccf4f646099a320af.tar.xz
Move GetSectionByName out of CompilationUnit.
For the upcoming Dwarf5 LineInfo changes, we will need to get several additional sections by name, but without a the Compilation Unit. This change prepares for that. Change-Id: I566855abb339a856110a2f7d243d3848fe2b3c18 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2268861 Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/dwarf_cu_to_module.cc')
-rw-r--r--src/common/dwarf_cu_to_module.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc
index 24bbf83b..be044ce3 100644
--- a/src/common/dwarf_cu_to_module.cc
+++ b/src/common/dwarf_cu_to_module.cc
@@ -935,11 +935,7 @@ void DwarfCUToModule::ReadSourceLines(uint64_t offset) {
const dwarf2reader::SectionMap &section_map
= 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");
+ = dwarf2reader::GetSectionByName(section_map, ".debug_line");
if (map_entry == section_map.end()) {
cu_context_->reporter->MissingSection(".debug_line");
return;