LLVM  14.0.0git
EPCDebugObjectRegistrar.h
Go to the documentation of this file.
1 //===- EPCDebugObjectRegistrar.h - EPC-based debug registration -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // ExecutorProcessControl based registration of debug objects.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_EXECUTIONENGINE_ORC_EPCDEBUGOBJECTREGISTRAR_H
14 #define LLVM_EXECUTIONENGINE_ORC_EPCDEBUGOBJECTREGISTRAR_H
15 
19 #include "llvm/Support/Error.h"
20 #include "llvm/Support/Memory.h"
21 
22 #include <cstdint>
23 #include <memory>
24 #include <vector>
25 
26 using namespace llvm::orc::shared;
27 
28 namespace llvm {
29 namespace orc {
30 
31 class ExecutionSession;
32 
33 /// Abstract interface for registering debug objects in the executor process.
35 public:
36  virtual Error registerDebugObject(ExecutorAddrRange TargetMem) = 0;
37  virtual ~DebugObjectRegistrar() {}
38 };
39 
40 /// Use ExecutorProcessControl to register debug objects locally or in a remote
41 /// executor process.
43 public:
45  : ES(ES), RegisterFn(RegisterFn) {}
46 
47  Error registerDebugObject(ExecutorAddrRange TargetMem) override;
48 
49 private:
50  ExecutionSession &ES;
51  ExecutorAddr RegisterFn;
52 };
53 
54 /// Create a ExecutorProcessControl-based DebugObjectRegistrar that emits debug
55 /// objects to the GDB JIT interface.
57 createJITLoaderGDBRegistrar(ExecutionSession &ES);
58 
59 } // end namespace orc
60 } // end namespace llvm
61 
62 #endif // LLVM_EXECUTIONENGINE_ORC_EPCDEBUGOBJECTREGISTRAR_H
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:37
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
JITSymbol.h
llvm::orc::DebugObjectRegistrar::~DebugObjectRegistrar
virtual ~DebugObjectRegistrar()
Definition: EPCDebugObjectRegistrar.h:37
llvm::orc::EPCDebugObjectRegistrar::EPCDebugObjectRegistrar
EPCDebugObjectRegistrar(ExecutionSession &ES, ExecutorAddr RegisterFn)
Definition: EPCDebugObjectRegistrar.h:44
Error.h
WrapperFunctionUtils.h
llvm::orc::shared
Definition: ELFNixPlatform.h:243
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::orc::DebugObjectRegistrar
Abstract interface for registering debug objects in the executor process.
Definition: EPCDebugObjectRegistrar.h:34
llvm::orc::ExecutorAddrRange
Represents an address range in the exceutor process.
Definition: ExecutorAddress.h:134
llvm::orc::EPCDebugObjectRegistrar
Use ExecutorProcessControl to register debug objects locally or in a remote executor process.
Definition: EPCDebugObjectRegistrar.h:42
Memory.h
ExecutorAddress.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::orc::ExecutionSession
An ExecutionSession represents a running JIT program.
Definition: Core.h:1275
llvm::orc::createJITLoaderGDBRegistrar
Expected< std::unique_ptr< EPCDebugObjectRegistrar > > createJITLoaderGDBRegistrar(ExecutionSession &ES)
Create a ExecutorProcessControl-based DebugObjectRegistrar that emits debug objects to the GDB JIT in...
Definition: EPCDebugObjectRegistrar.cpp:20