[Lldb-commits] [PATCH] D70840: [LLDB] [DWARF] Strip out the thumb bit from addresses on ARM
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 24 01:09:39 PST 2020
mstorsjo added a comment.
In D70840#1792498 <https://reviews.llvm.org/D70840#1792498>, @labath wrote:
> In D70840#1791292 <https://reviews.llvm.org/D70840#1791292>, @mstorsjo wrote:
> > And irrespectively if the ArchSpec vs Architecture design, can you (either of you) comment on the updated form of the patch?
> The code still seems somewhat schizophrenic to me. :/ The line tables are fixed up super late, but DW_AT_low_pc is adjusted very early. The line table adjustment happens even after sorting, which means the fixup could alter the sort order. It probably wouldn't matter in practice, as everything would just get decremented by one, but it still seems like a bad design. And adjusting the low_pc so early will complicate the move to the llvm dwarf parser.
> I think I'd most prefer some middle ground where the fixup happens after the lowest extraction layers are finished, but before the data hits the "generic" code. It's possible that no such place exists right now, but it might be possible to create something with a bit of refactoring...
I tried to revisit this a bit now. Thanks to D72920 <https://reviews.llvm.org/D72920>, some of the more problematic cases went away, and I tried to trace all callers of the relevant methods and moving the fixups into them. Now the DWARFDebugInfoEntry class is no longer touched at all. I also tried to move fixups to before sorting.
CHANGES SINCE LAST ACTION
More information about the lldb-commits