Skip to content

Commit

Permalink
Fix bugs with alternative section naming on mac, and unpropagated
Browse files Browse the repository at this point in the history
section information.

Change-Id: I6f4e112a83aeee1e4cd525c1d1d0b9213ef2d09b
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/5838157
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
  • Loading branch information
andrewbrook authored and Joshua Peraza committed Sep 4, 2024
1 parent 6b0c5b7 commit 8668fce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/common/dwarf/dwarf2reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ const SectionMap::const_iterator GetSectionByName(const SectionMap&
std::string macho_name("__");
macho_name += name + 1;
iter = sections.find(macho_name);

// .debug_str_offsets is alternatively named .debug_str_offs, so try both
if (iter == sections.end() && std::string(name) == ".debug_str_offsets") {
return GetSectionByName(sections, ".debug_str_offs");
}
return iter;
}

Expand Down
5 changes: 3 additions & 2 deletions src/common/mac/dump_syms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ class DumpSymbols::DumperLineToModule:
vector<Module::Line>* lines,
std::map<uint32_t, Module::File*>* files) {
DwarfLineToModule handler(module, compilation_dir_, lines, files);
LineInfo parser(program, length, byte_reader_, nullptr, 0,
nullptr, 0, &handler);
LineInfo parser(program, length, byte_reader_, string_section,
string_section_length, line_string_section,
line_string_section_length, &handler);
parser.Start();
}
private:
Expand Down

0 comments on commit 8668fce

Please sign in to comment.