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

source code of lldb/include/lldb/lldb-private-interfaces.h