1 | //===-- lldb-private-interfaces.h -------------------------------*- 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 | #ifndef LLDB_LLDB_PRIVATE_INTERFACES_H |
10 | #define LLDB_LLDB_PRIVATE_INTERFACES_H |
11 | |
12 | #if defined(__cplusplus) |
13 | |
14 | #include "lldb/lldb-enumerations.h" |
15 | #include "lldb/lldb-forward.h" |
16 | #include "lldb/lldb-private-enumerations.h" |
17 | #include "lldb/lldb-types.h" |
18 | #include <memory> |
19 | #include <set> |
20 | |
21 | namespace llvm { |
22 | namespace json { |
23 | class Object; |
24 | class Value; |
25 | } |
26 | } // namespace llvm |
27 | |
28 | namespace lldb_private { |
29 | typedef lldb::ABISP (*ABICreateInstance)(lldb::ProcessSP process_sp, |
30 | const ArchSpec &arch); |
31 | typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)( |
32 | const ArchSpec &arch); |
33 | typedef Disassembler *(*DisassemblerCreateInstance)(const ArchSpec &arch, |
34 | const char *flavor); |
35 | typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process, |
36 | bool force); |
37 | typedef lldb::JITLoaderSP (*JITLoaderCreateInstance)(Process *process, |
38 | bool force); |
39 | typedef ObjectContainer *(*ObjectContainerCreateInstance)( |
40 | const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, |
41 | lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, |
42 | lldb::offset_t length); |
43 | typedef size_t (*ObjectFileGetModuleSpecifications)( |
44 | const FileSpec &file, lldb::DataBufferSP &data_sp, |
45 | lldb::offset_t data_offset, lldb::offset_t file_offset, |
46 | lldb::offset_t length, ModuleSpecList &module_specs); |
47 | typedef ObjectFile *(*ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp, |
48 | lldb::DataBufferSP &data_sp, |
49 | lldb::offset_t data_offset, |
50 | const FileSpec *file, |
51 | lldb::offset_t file_offset, |
52 | lldb::offset_t length); |
53 | typedef ObjectFile *(*ObjectFileCreateMemoryInstance)( |
54 | const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, |
55 | const lldb::ProcessSP &process_sp, lldb::addr_t offset); |
56 | typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp, |
57 | const FileSpec &outfile, Status &error); |
58 | typedef EmulateInstruction *(*EmulateInstructionCreateInstance)( |
59 | const ArchSpec &arch, InstructionType inst_type); |
60 | typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process, |
61 | bool force); |
62 | typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language); |
63 | typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)( |
64 | Process *process, lldb::LanguageType language); |
65 | typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject)( |
66 | CommandInterpreter &interpreter); |
67 | typedef lldb::BreakpointPreconditionSP ( |
68 | *LanguageRuntimeGetExceptionPrecondition)(lldb::LanguageType language, |
69 | bool throw_bp); |
70 | typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)( |
71 | Process &process); |
72 | typedef Status (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info, |
73 | Target *target); |
74 | typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process); |
75 | typedef lldb::PlatformSP (*PlatformCreateInstance)(bool force, |
76 | const ArchSpec *arch); |
77 | typedef lldb::ProcessSP (*ProcessCreateInstance)( |
78 | lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, |
79 | const FileSpec *crash_file_path, bool can_connect); |
80 | typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)( |
81 | Debugger &debugger); |
82 | typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp); |
83 | typedef SymbolVendor *(*SymbolVendorCreateInstance)( |
84 | const lldb::ModuleSP &module_sp, |
85 | lldb_private::Stream |
86 | *feedback_strm); // Module can be NULL for default system symbol vendor |
87 | typedef bool (*BreakpointHitCallback)(void *baton, |
88 | StoppointCallbackContext *context, |
89 | lldb::user_id_t break_id, |
90 | lldb::user_id_t break_loc_id); |
91 | typedef bool (*WatchpointHitCallback)(void *baton, |
92 | StoppointCallbackContext *context, |
93 | lldb::user_id_t watch_id); |
94 | typedef bool (*ThreadPlanShouldStopHereCallback)( |
95 | ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, |
96 | Status &status, void *baton); |
97 | typedef lldb::ThreadPlanSP (*ThreadPlanStepFromHereCallback)( |
98 | ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, |
99 | Status &status, void *baton); |
100 | typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch); |
101 | typedef lldb::MemoryHistorySP (*MemoryHistoryCreateInstance)( |
102 | const lldb::ProcessSP &process_sp); |
103 | typedef lldb::InstrumentationRuntimeType (*InstrumentationRuntimeGetType)(); |
104 | typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance)( |
105 | const lldb::ProcessSP &process_sp); |
106 | typedef lldb::TypeSystemSP (*TypeSystemCreateInstance)( |
107 | lldb::LanguageType language, Module *module, Target *target); |
108 | typedef lldb::REPLSP (*REPLCreateInstance)(Status &error, |
109 | lldb::LanguageType language, |
110 | Debugger *debugger, Target *target, |
111 | const char *repl_options); |
112 | typedef int (*ComparisonFunction)(const void *, const void *); |
113 | typedef void (*DebuggerInitializeCallback)(Debugger &debugger); |
114 | typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForSessionFile)( |
115 | const llvm::json::Value &trace_session_file, |
116 | llvm::StringRef session_file_dir, lldb_private::Debugger &debugger); |
117 | typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)( |
118 | Process &process); |
119 | } // namespace lldb_private |
120 | |
121 | #endif // #if defined(__cplusplus) |
122 | |
123 | #endif // LLDB_LLDB_PRIVATE_INTERFACES_H |
124 | |