This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Fix lookup of .debug_loclists with split-dwarf
ClosedPublic

Authored by kimanh on Jul 30 2021, 7:11 AM.

Details

Summary

This patch fixes the lookup of locations in
.debug_loclists, if they are split in a .dwp file.

Mainly, we need to consider the cu index offsets.

Diff Detail

Event Timeline

kimanh created this revision.Jul 30 2021, 7:11 AM
kimanh edited the summary of this revision. (Show Details)Jul 30 2021, 7:13 AM
kimanh added reviewers: labath, jankratochvil.
kimanh published this revision for review.Jul 30 2021, 7:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2021, 7:15 AM
jankratochvil accepted this revision.Aug 1 2021, 11:34 AM

LGTM with some those adjustments.

lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
460

There could be some ReportError.

480–482

loclists_base should be adjusted or printed also together with offset or so.

lldb/test/Shell/SymbolFile/DWARF/x86/debug_loclists-dwp.s
16–17

.Ltmp0 is not used.

56

Offsets not valid.

187

These offsets are no longer valid.

190

Likewise.

205

Likewise.

212–237

There could be the standard indentation.

This revision is now accepted and ready to land.Aug 1 2021, 11:34 AM
kimanh updated this revision to Diff 363407.Aug 2 2021, 2:09 AM
kimanh marked 7 inline comments as done.

Address reviews:

  • remove unused tmp label
  • remove invalid offsets
  • add ReportError when no loclist contribution was found
  • adapt ReportError logging to include offset and loclist base
This revision was landed with ongoing or failed builds.Aug 4 2021, 3:07 AM
This revision was automatically updated to reflect the committed changes.