[llvm] [ORC] Resolve JITLoaderGDB alloc actions via lookupAndApply (PR #223325)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 01:22:49 PDT 2026
https://github.com/lhames created https://github.com/llvm/llvm-project/pull/223325
ELFDebugObjectPlugin resolved its RegisterJITLoaderGDB alloc-action address with EPC.getBootstrapSymbols. For consistency, switch to lookupAndApply/recordAddr on the bootstrap JITDylib instead.
>From 59e05f4496380e84d0d16cac99a58df88d5ca562 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 14 Sep 2026 17:00:18 +1000
Subject: [PATCH] [ORC] Resolve JITLoaderGDB alloc actions via lookupAndApply
ELFDebugObjectPlugin resolved its RegisterJITLoaderGDB alloc-action
address with EPC.getBootstrapSymbols. For consistency, switch to
lookupAndApply/recordAddr on the bootstrap JITDylib instead.
---
.../ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp
index fea2dc42dda8d..0c73504e8e981 100644
--- a/llvm/lib/ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp
@@ -19,6 +19,7 @@
#include "llvm/ExecutionEngine/JITLink/JITLink.h"
#include "llvm/ExecutionEngine/JITLink/JITLinkDylib.h"
#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
+#include "llvm/ExecutionEngine/Orc/LookupAndApply.h"
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
#include "llvm/ExecutionEngine/Orc/Shared/MemoryFlags.h"
#include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
@@ -194,8 +195,9 @@ ELFDebugObjectPlugin::ELFDebugObjectPlugin(ExecutionSession &ES,
: ES(ES), RequireDebugSections(RequireDebugSections) {
// Pass bootstrap symbol for registration function to enable debugging
ErrorAsOutParameter _(&Err);
- Err = ES.getExecutorProcessControl().getBootstrapSymbols(
- {{RegistrationAction, rt::RegisterJITLoaderGDBAllocActionName}});
+ Err = lookupAndApply(
+ ES.getBootstrapJITDylib(),
+ {recordAddr(rt::RegisterJITLoaderGDBAllocActionName, &RegistrationAction)});
}
ELFDebugObjectPlugin::~ELFDebugObjectPlugin() = default;
More information about the llvm-commits
mailing list