This is an archive of the discontinued LLVM Phabricator instance.

DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit
ClosedPublic

Authored by labath on Jun 6 2019, 1:39 AM.

Details

Summary

The DWARFCompileUnit is set as the "user data" of the lldb compile unit
directly in the constructor (see ParseCompileUnit).

This means that instead of going through unit indexes, we can just fetch
the DWARF unit directly from there.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Jun 6 2019, 1:39 AM
clayborg accepted this revision.Jun 6 2019, 7:32 AM
This revision is now accepted and ready to land.Jun 6 2019, 7:32 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2019, 2:40 AM
xiaobai added a subscriber: xiaobai.Jun 7 2019, 5:53 PM

Just a heads up: I reverted this change (rL362862) because it broke the test suite on macOS. Breakpoints were not being resolved correctly.

Thanks for reverting this. It seems I did not take into account here the fact that SymbolFileDWARFDebugMap creates CompileUnits without setting the the UserData to point to the relevant dwarf compile unit.

I'll drop this patch and implement the thing I needed this for in D63005 differently.