From b6f36dd7757f5cdb460f7b2ccf4f646099a320af Mon Sep 17 00:00:00 2001 From: Sterling Augustine Date: Fri, 26 Jun 2020 11:24:16 -0700 Subject: 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 --- src/common/dwarf_cu_to_module.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/common/dwarf_cu_to_module.cc') 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 §ion_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; -- cgit v1.2.1