[PATCH] D96627: [llvm-jitlink] Implement JITLoaderGDB ObjectLinkingLayer plugin for ELF x86-64
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 10:46:04 PST 2021
dblaikie added a comment.
In D96627#2561402 <https://reviews.llvm.org/D96627#2561402>, @lhames wrote:
> This is very exciting.
>
> This is adopting RuntimeDyld's approach of patching section addresses to inform the debugger about final locations. I think this is ideal for a prototype, but probably not the right approach to the final version. I've only got two loosely formed thoughts on this so far:
>
> (1) We shouldn't special-case the JITLinkContext callbacks except as a last resort. If we have to use them at all we should prefer making any information required available via generic structures like the LinkGraph. In this case I think you could build a SectionRange for each JITLink::Section rather than rely on the SegmentLayout.
>
> (2) If we constructed the debug object file from scratch (rather than mutating the existing one) then we could
>
> - support debug info for raw LinkGraphs (very attractive for long term performance -- avoids serializing / deserializing to objects),
> - reduce memory usage by not redundantly representing non-debug sections in the debug object
> - potentially dead strip debug info to further reduce memory overhead
>
> Whether any of this is reasonable, and how much would it would be is another question. Probably time for me to learn some DWARF. :)
>
> Dave -- do you have any immediate thoughts?
No immediate thoughts - happy to chat more about it, though. We might have to meet in the middle with regards to learning things here - I don't know too much about these JIT debugger APIs or what options they might have with regards to their input formats, resolution of addresses, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96627/new/
https://reviews.llvm.org/D96627
More information about the llvm-commits
mailing list