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
14#include "lldb/lldb-forward.h"
16#include "lldb/lldb-types.h"
17#include <memory>
18#include <set>
19
20namespace llvm {
21namespace json {
22class Object;
23class Value;
24}
25} // namespace llvm
26
27namespace lldb_private {
28class ScriptedInterfaceUsages;
30 const ArchSpec &arch);
31typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
32 const ArchSpec &arch);
34 const char *flavor);
35typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
36 bool force);
38 bool force);
39typedef 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);
43typedef ObjectContainer *(*ObjectContainerCreateMemoryInstance)(
44 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
45 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
47 const FileSpec &file, lldb::DataBufferSP &data_sp,
48 lldb::offset_t data_offset, lldb::offset_t file_offset,
49 lldb::offset_t length, ModuleSpecList &module_specs);
50typedef ObjectFile *(*ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp,
51 lldb::DataBufferSP data_sp,
52 lldb::offset_t data_offset,
53 const FileSpec *file,
54 lldb::offset_t file_offset,
55 lldb::offset_t length);
56typedef ObjectFile *(*ObjectFileCreateMemoryInstance)(
57 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
58 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
59typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp,
61 Status &error);
62typedef EmulateInstruction *(*EmulateInstructionCreateInstance)(
63 const ArchSpec &arch, InstructionType inst_type);
64typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process,
65 bool force);
66typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language);
67typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)(
68 Process *process, lldb::LanguageType language);
70 CommandInterpreter &interpreter);
73 bool throw_bp);
75 Process &process);
77 Target *target);
78typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
80 const ArchSpec *arch);
82 lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
83 const FileSpec *crash_file_path, bool can_connect);
85 Target &target);
87 Debugger &debugger);
88typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
89typedef SymbolVendor *(*SymbolVendorCreateInstance)(
90 const lldb::ModuleSP &module_sp,
92 *feedback_strm); // Module can be NULL for default system symbol vendor
93typedef SymbolLocator *(*SymbolLocatorCreateInstance)();
94typedef std::optional<ModuleSpec> (*SymbolLocatorLocateExecutableObjectFile)(
95 const ModuleSpec &module_spec);
96typedef std::optional<FileSpec> (*SymbolLocatorFindSymbolFileInBundle)(
97 const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch);
98typedef std::optional<FileSpec> (*SymbolLocatorLocateExecutableSymbolFile)(
99 const ModuleSpec &module_spec, const FileSpecList &default_search_paths);
101 ModuleSpec &module_spec, Status &error, bool force_lookup,
102 bool copy_executable);
104 std::function<bool(void *baton, StoppointCallbackContext *context,
105 lldb::user_id_t break_id, lldb::user_id_t break_loc_id)>;
106
107typedef bool (*WatchpointHitCallback)(void *baton,
109 lldb::user_id_t watch_id);
111 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
112 Status &status, void *baton);
114 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
115 Status &status, void *baton);
116typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
118 const lldb::ProcessSP &process_sp);
121 const lldb::ProcessSP &process_sp);
123 lldb::LanguageType language, Module *module, Target *target);
125 lldb::LanguageType language,
126 Debugger *debugger, Target *target,
127 const char *repl_options);
130typedef int (*ComparisonFunction)(const void *, const void *);
131typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
132/// Trace
133/// \{
134typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceFromBundle)(
135 const llvm::json::Value &trace_bundle_description,
136 llvm::StringRef session_file_dir, lldb_private::Debugger &debugger);
137typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)(
138 Process &process);
139typedef llvm::Expected<lldb::TraceExporterUP> (*TraceExporterCreateInstance)();
141 CommandInterpreter &interpreter);
142/// \}
143} // namespace lldb_private
144
145#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:53
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
A file collection class.
Definition: FileSpecList.h:91
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.
bool(* ObjectFileSaveCore)(const lldb::ProcessSP &process_sp, lldb_private::SaveCoreOptions &options, Status &error)
llvm::Expected< lldb::TraceSP >(* TraceCreateInstanceForLiveProcess)(Process &process)
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::function< bool(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)> BreakpointHitCallback
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)
lldb::ABISP(* ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch)
lldb::DisassemblerSP(* DisassemblerCreateInstance)(const ArchSpec &arch, const char *flavor)
lldb::CommandObjectSP(* ThreadTraceExportCommandCreator)(CommandInterpreter &interpreter)
ScriptLanguage
Script interpreter types.
std::shared_ptr< lldb_private::TypeSystem > TypeSystemSP
Definition: lldb-forward.h:465
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
Definition: lldb-forward.h:449
std::shared_ptr< lldb_private::ABI > ABISP
Definition: lldb-forward.h:315
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
Definition: lldb-forward.h:404
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
Definition: lldb-forward.h:331
std::shared_ptr< lldb_private::Platform > PlatformSP
Definition: lldb-forward.h:386
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:373
std::shared_ptr< lldb_private::RegisterTypeBuilder > RegisterTypeBuilderSP
Definition: lldb-forward.h:394
LanguageType
Programming language type.
std::shared_ptr< lldb_private::MemoryHistory > MemoryHistorySP
Definition: lldb-forward.h:368
std::shared_ptr< lldb_private::StructuredDataPlugin > StructuredDataPluginSP
Definition: lldb-forward.h:434
std::shared_ptr< lldb_private::Process > ProcessSP
Definition: lldb-forward.h:387
std::shared_ptr< lldb_private::BreakpointPrecondition > BreakpointPreconditionSP
Definition: lldb-forward.h:325
InstrumentationRuntimeType
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
Definition: lldb-forward.h:339
std::shared_ptr< lldb_private::Listener > ListenerSP
Definition: lldb-forward.h:366
uint64_t user_id_t
Definition: lldb-types.h:82
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:334
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:335
uint64_t addr_t
Definition: lldb-types.h:80
std::shared_ptr< lldb_private::JITLoader > JITLoaderSP
Definition: lldb-forward.h:362
std::shared_ptr< lldb_private::Target > TargetSP
Definition: lldb-forward.h:444
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
Definition: lldb-forward.h:358
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:371
std::shared_ptr< lldb_private::REPL > REPLSP
Definition: lldb-forward.h:399
Definition: Debugger.h:54