This is an archive of the discontinued LLVM Phabricator instance.

Fix .debug_aranges parsing.
ClosedPublic

Authored by clayborg on Sep 14 2020, 12:27 PM.

Details

Summary

Code was added that used llvm error checking to parse .debug_aranges, but the error check after parsing the DWARFDebugArangesSet was reversed and was causing no error to be returned with no valid address ranges being actually used. This meant we always would fall back onto creating out own address ranges by parsing the compile unit's ranges. This was causing problems for cases where the DW_TAG_compile_unit had a single address range by using a DW_AT_low_pc and DW_AT_high_pc attribute pair (not using a DW_AT_ranges attribute), but the .debug_aranges had correct split ranges. In this case we would end up using the single range for the compile unit that encompassed all of the ranges from the .debug_aranges section and would cause address resolving issues in LLDB where address lookups would fail for certain addresses.

Diff Detail

Event Timeline

clayborg created this revision.Sep 14 2020, 12:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 14 2020, 12:27 PM
clayborg requested review of this revision.Sep 14 2020, 12:27 PM
JDevlieghere accepted this revision.Sep 14 2020, 9:39 PM

Nice catch!

This revision is now accepted and ready to land.Sep 14 2020, 9:39 PM
This revision was landed with ongoing or failed builds.Sep 15 2020, 11:51 AM
This revision was automatically updated to reflect the committed changes.