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
450

There could be some ReportError.

466

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

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

.Ltmp0 is not used.

55

Offsets not valid.

186

These offsets are no longer valid.

189

Likewise.

204

Likewise.

211–236

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.