LLDB mainline
lldb-private-interfaces.h
Go to the documentation of this file.
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
13#include "lldb/lldb-forward.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 {
28 const ArchSpec &arch);
29typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
30 const ArchSpec &arch);
32 const char *flavor);
33typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
34 bool force);
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);
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);
69 CommandInterpreter &interpreter);
72 bool throw_bp);
74 Process &process);
76 Target *target);
77typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
79 const ArchSpec *arch);
81 lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
82 const FileSpec *crash_file_path, bool can_connect);
84 Target &target);
86 Debugger &debugger);
87typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
88typedef SymbolVendor *(*SymbolVendorCreateInstance)(
89 const lldb::ModuleSP &module_sp,
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);
100 ModuleSpec &module_spec, Status &error, bool force_lookup,
101 bool copy_executable);
102typedef bool (*BreakpointHitCallback)(void *baton,
104 lldb::user_id_t break_id,
105 lldb::user_id_t break_loc_id);
106typedef bool (*WatchpointHitCallback)(void *baton,
108 lldb::user_id_t watch_id);
110 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
111 Status &status, void *baton);
113 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
114 Status &status, void *baton);
115typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
117 const lldb::ProcessSP &process_sp);
120 const lldb::ProcessSP &process_sp);
122 lldb::LanguageType language, Module *module, Target *target);
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)();
138 CommandInterpreter &interpreter);
139/// \}
140} // namespace lldb_private
141
142#endif // LLDB_LLDB_PRIVATE_INTERFACES_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition: ArchSpec.h:31
A class to manage flag bits.
Definition: Debugger.h:80
A plug-in interface definition class for dynamic loaders.
Definition: DynamicLoader.h:52
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
A file collection class.
Definition: FileSpecList.h:85
A file utility class.
Definition: FileSpec.h:56
A class to manage flags.
Definition: Flags.h:22
A class that describes an executable image and its associated object and symbol files.
Definition: Module.h:88
A plug-in interface definition class for object containers.
A plug-in interface definition class for object file parsers.
Definition: ObjectFile.h:44
A plug-in interface definition class for halted OS helpers.
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
An error handling class.
Definition: Status.h:44
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Provides public interface for all SymbolFiles.
Definition: SymbolFile.h:50
A plug-in interface definition class for system runtimes.
Definition: SystemRuntime.h:43
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
llvm::Expected< lldb::TraceSP >(* TraceCreateInstanceForLiveProcess)(Process &process)
bool(* ObjectFileSaveCore)(const lldb::ProcessSP &process_sp, const FileSpec &outfile, lldb::SaveCoreStyle &core_style, Status &error)
lldb::InstrumentationRuntimeType(* InstrumentationRuntimeGetType)()
int(* ComparisonFunction)(const void *, const void *)
bool(* WatchpointHitCallback)(void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id)
std::optional< FileSpec >(* SymbolLocatorLocateExecutableSymbolFile)(const ModuleSpec &module_spec, const FileSpecList &default_search_paths)
size_t(* ObjectFileGetModuleSpecifications)(const FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, ModuleSpecList &module_specs)
void(* DebuggerInitializeCallback)(Debugger &debugger)
bool(* ThreadPlanShouldStopHereCallback)(ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, Status &status, void *baton)
std::unique_ptr< Architecture >(* ArchitectureCreateInstance)(const ArchSpec &arch)
InstructionType
Instruction types.
lldb::PlatformSP(* PlatformCreateInstance)(bool force, const ArchSpec *arch)
lldb::ProcessSP(* ProcessCreateInstance)(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
lldb::BreakpointPreconditionSP(* LanguageRuntimeGetExceptionPrecondition)(lldb::LanguageType language, bool throw_bp)
lldb::MemoryHistorySP(* MemoryHistoryCreateInstance)(const lldb::ProcessSP &process_sp)
std::optional< ModuleSpec >(* SymbolLocatorLocateExecutableObjectFile)(const ModuleSpec &module_spec)
lldb::CommandObjectSP(* LanguageRuntimeGetCommandObject)(CommandInterpreter &interpreter)
lldb::ThreadPlanSP(* ThreadPlanStepFromHereCallback)(ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, Status &status, void *baton)
lldb::JITLoaderSP(* JITLoaderCreateInstance)(Process *process, bool force)
std::optional< FileSpec >(* SymbolLocatorFindSymbolFileInBundle)(const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch)
bool(* SymbolLocatorDownloadObjectAndSymbolFile)(ModuleSpec &module_spec, Status &error, bool force_lookup, bool copy_executable)
Status(* StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info, Target *target)
bool(* BreakpointHitCallback)(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
lldb::ABISP(* ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch)
lldb::DisassemblerSP(* DisassemblerCreateInstance)(const ArchSpec &arch, const char *flavor)
lldb::CommandObjectSP(* ThreadTraceExportCommandCreator)(CommandInterpreter &interpreter)
std::shared_ptr< lldb_private::TypeSystem > TypeSystemSP
Definition: lldb-forward.h:457
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
Definition: lldb-forward.h:441
std::shared_ptr< lldb_private::ABI > ABISP
Definition: lldb-forward.h:310
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
Definition: lldb-forward.h:398
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
Definition: lldb-forward.h:325
std::shared_ptr< lldb_private::Platform > PlatformSP
Definition: lldb-forward.h:380
uint64_t offset_t
Definition: lldb-types.h:85
FrameComparison
This is the return value for frame comparisons.
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
Definition: lldb-forward.h:367
std::shared_ptr< lldb_private::RegisterTypeBuilder > RegisterTypeBuilderSP
Definition: lldb-forward.h:388
LanguageType
Programming language type.
std::shared_ptr< lldb_private::MemoryHistory > MemoryHistorySP
Definition: lldb-forward.h:362
std::shared_ptr< lldb_private::StructuredDataPlugin > StructuredDataPluginSP
Definition: lldb-forward.h:426
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:381
std::shared_ptr< lldb_private::BreakpointPrecondition > BreakpointPreconditionSP
Definition: lldb-forward.h:319
InstrumentationRuntimeType
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
Definition: lldb-forward.h:333
std::shared_ptr< lldb_private::Listener > ListenerSP
Definition: lldb-forward.h:360
uint64_t user_id_t
Definition: lldb-types.h:82
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:328
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:329
uint64_t addr_t
Definition: lldb-types.h:81
std::shared_ptr< lldb_private::JITLoader > JITLoaderSP
Definition: lldb-forward.h:356
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:436
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
Definition: lldb-forward.h:352
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:365
std::shared_ptr< lldb_private::REPL > REPLSP
Definition: lldb-forward.h:393
Definition: Debugger.h:54