Page MenuHomePhabricator

DWZ 01/06: Adjust existing code for the DWZ support
Changes PlannedPublic

Authored by jankratochvil on Nov 26 2017, 5:17 AM.

Details

Reviewers
clayborg
labath
Summary

New DWARFCompileUnit::GetMainCU() and DWARFDIE::GetMainDWARF() need to locate original symbol file when they are place in a DWZ common file. For example for UID context. One needs to access both symbol files as the one where the DIE really comes from still needs to be used for .debug_abbrev, .debug_str and .debug_line.

Probably more such cases need to be caught, they get indicated by later implemented DWARFDebugInfo::DWZRedirect:

"Internal LLDB error - unable to resolve offset 0x%8.8" PRIx32
" as DWZ common file has been passed, change the callers to use:"
" DWARFDIE::GetDWARF() -> DWARFDIE::GetMainDWARF()",

All DWZ patches are also applied in: git clone -b dwz git://git.jankratochvil.net/lldb

Diff Detail

Event Timeline

jankratochvil created this revision.Nov 26 2017, 5:17 AM
clayborg requested changes to this revision.Nov 27 2017, 11:05 AM
clayborg added inline comments.
source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
182–183

Just fix the DIERef constructor to not use 0 for the cu_offset?

source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
386–388

This seems like the wrong place to do this call. We are asking all DWARF to index itself from DWARFDebugInfoEntry::GetDIENamesAndRanges()? Doesn't seem like the right place.

This revision now requires changes to proceed.Nov 27 2017, 11:05 AM
jankratochvil added inline comments.
source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
182–183

This has been fixed in the meantime by @alexshap's D42563.

source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
386–388

Fortunately it is somehow no longer needed now, dropped it.

jankratochvil retitled this revision from DWZ 10/12: Adjust existing code for the DWZ support. to DWZ 08/11: Adjust existing code for the DWZ support..
jankratochvil marked 3 inline comments as done.

bugfix

jankratochvil planned changes to this revision.Apr 14 2018, 4:22 AM
jankratochvil retitled this revision from DWZ 08/11: Adjust existing code for the DWZ support. to DWZ 04/07: Adjust existing code for the DWZ support..

It is now reworked without FileOffset and the remapping to unique DIE offsets for each DW_TAG_partial_unit inclusion by DW_TAG_imported_unit, as discussed in: https://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180409/040324.html

jankratochvil planned changes to this revision.May 13 2018, 12:43 PM
jankratochvil edited the summary of this revision. (Show Details)
jankratochvil retitled this revision from DWZ 04/07: Adjust existing code for the DWZ support. to DWZ 01/06: Adjust existing code for the DWZ support..
jankratochvil retitled this revision from DWZ 01/06: Adjust existing code for the DWZ support. to DWZ 01/06: Adjust existing code for the DWZ support.Jul 29 2018, 1:44 PM
jankratochvil set the repository for this revision to rLLDB LLDB.Aug 2 2018, 9:25 AM
jankratochvil marked an inline comment as done.Aug 2 2018, 11:32 PM
jankratochvil added a project: Restricted Project.Aug 30 2018, 7:12 AM
jankratochvil planned changes to this revision.Jun 27 2019, 3:45 AM