[llvm] [TOOLS][DWARFDUMP][DWARF] Print full DIE offset for a CU or local TU (PR #121877)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 10:39:12 PST 2025
dwblaikie wrote:
Adding the DIE offset to the CU offset for foreign CUs would be incorrect - the DIE offset is in the split full unit, but the CU offset is to the skeleton unit.
Could we render the CU offset when we dump the DW_IDX_compile/type_unit (& then users could add the two offsets together more easily, since they'd be right next to each other?)? (& for foreign units, we could dump the skeleton CU offset and the TU hash)
Seems awkward for some of the hashes to be absolute, and some not/hard to tell at the context - I guess maybe the most general might look like:
Local CU/TU, something like (CU offset, plus DIE offset, then total):
`DW_IDX_offset: 0x00000001 + 0x00000002 = 0x00000003`
Then for foreign CU/TU, maybe the best thing is DWO ID relative?
`DW_IDX_offset: 0x1234abcd -> 0x00000002`
or something like that?
https://github.com/llvm/llvm-project/pull/121877
More information about the llvm-commits
mailing list