File indexing completed on 2026-05-10 08:43:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef LLVM_EXECUTIONENGINE_ORC_EPCDEBUGOBJECTREGISTRAR_H
0014 #define LLVM_EXECUTIONENGINE_ORC_EPCDEBUGOBJECTREGISTRAR_H
0015
0016 #include "llvm/ExecutionEngine/JITSymbol.h"
0017 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
0018 #include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h"
0019 #include "llvm/Support/Error.h"
0020 #include "llvm/Support/Memory.h"
0021
0022 #include <cstdint>
0023 #include <memory>
0024
0025 namespace llvm {
0026 namespace orc {
0027
0028 class ExecutionSession;
0029
0030
0031 class DebugObjectRegistrar {
0032 public:
0033 virtual Error registerDebugObject(ExecutorAddrRange TargetMem,
0034 bool AutoRegisterCode) = 0;
0035 virtual ~DebugObjectRegistrar() = default;
0036 };
0037
0038
0039
0040 class EPCDebugObjectRegistrar : public DebugObjectRegistrar {
0041 public:
0042 EPCDebugObjectRegistrar(ExecutionSession &ES, ExecutorAddr RegisterFn)
0043 : ES(ES), RegisterFn(RegisterFn) {}
0044
0045 Error registerDebugObject(ExecutorAddrRange TargetMem,
0046 bool AutoRegisterCode) override;
0047
0048 private:
0049 ExecutionSession &ES;
0050 ExecutorAddr RegisterFn;
0051 };
0052
0053
0054
0055
0056
0057
0058
0059
0060 Expected<std::unique_ptr<EPCDebugObjectRegistrar>> createJITLoaderGDBRegistrar(
0061 ExecutionSession &ES,
0062 std::optional<ExecutorAddr> RegistrationFunctionDylib = std::nullopt);
0063
0064 }
0065 }
0066
0067 #endif