[PATCH] D97335: [Orc] Add JITLink debug support plugin for ELF x86-64
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 15:26:33 PST 2021
sgraenitz added a comment.
Thanks for the feedback.
In D97335#2588617 <https://reviews.llvm.org/D97335#2588617>, @lhames wrote:
> So, I would be inclined to move `DebugObject` into ORC, and `void notifyMaterializing(jitlink::LinkGraph &G)` and `Expected<std::unique_ptr<DebugObject>> createDebugObject(LinkGraph &G)` from `JITLinkContext` to ObjectLinkingLayerJITLinkContext
At first I followed the approach from EH frame registration and thought I could reuse some JITLink code for handling ELF headers, but yes there is no real need to have the debug object classes there. And yes moving them over to ORC also avoids extra API. It was a bit more reorganization than I expected initially, but I think the result is better than the first version.
> The new methods should carry comments saying that they're deprecated -- we can leave them in for the purposes of DebugObjectManagerPlugin for now, but we don't want other people to start using them.
I need to double-check my previous comments and will add the note then.
> (the decl for which may need to be hoisted into the ObjectLinkingLayer.h header for now).
Instead of creating a new interface, I just added a MemoryBufferRef parameter to Plugin::notifyMaterializing() for now. Is that acceptable? Otherwise, can you give a rough description of the API you had in mind?
What I realized during my ExtensibleRTTI hack is, that I could also capture the incoming object file with an extra ObjectLayer above the linking layer. At first sight it doesn't look impossible. I'd also have to add some support code first and I don't know if plugin-layer-coop is a design question you already considered or rejected. What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97335/new/
https://reviews.llvm.org/D97335
More information about the llvm-commits
mailing list