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