[PATCH] D147310: [Orc] Add AutoRegisterCode option for DebugObjectManagerPlugin

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 11:42:40 PDT 2023


lhames accepted this revision.
lhames added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks Stefan!



================
Comment at: llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp:113
              })
       .release();
 }
----------------
sgraenitz wrote:
> @lhames I've never used these alloc actions in practice and just did copy/paste here. Do you think it's ok like this?
This looks good, but you'll need to update `llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp`'s use to pass the bool arg in.

DebugObjectManagerPlugin.h should probably be updated to use allocation actions in the future, but that can be done independently of this patch.

Side note, since I'm not sure it's well documented: An AllocAction is just an SPS wrapper function that returns an `SPSError`. It could be called via the regular RPC path, but by restricting the return type to SPSError it becomes possible to batch up calls on the LinkGraph instead: the memory manager will call the actions on our behalf (using the serialized argument buffer, so the memory manager doesn't care about the serialized argument types), and the memory manager knows how to interpret the return value, since it's always SPSError.

Since `llvm_orc_registerJITLoaderGDBAllocAction` and `llvm_orc_registerJITLoaderGDBWrapper` are identical we could just have one call the other, but they're also not a lot of code to duplicate either. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147310/new/

https://reviews.llvm.org/D147310



More information about the llvm-commits mailing list