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#include <vector>
19
20namespace llvm {
21namespace json {
22class Object;
23class Value;
24}
25} // namespace llvm
26
27namespace lldb_private {
31 const ArchSpec &arch);
32typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
33 const ArchSpec &arch);
35 const ArchSpec &arch, const char *flavor, const char *cpu,
36 const char *features);
37typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
38 bool force);
40 bool force);
41typedef ObjectContainer *(*ObjectContainerCreateInstance)(
42 const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
43 lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset,
44 lldb::offset_t length);
45typedef ObjectContainer *(*ObjectContainerCreateMemoryInstance)(
46 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
47 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
49 const FileSpec &file, lldb::DataBufferSP &data_sp,
50 lldb::offset_t data_offset, lldb::offset_t file_offset,
51 lldb::offset_t length, ModuleSpecList &module_specs);
52typedef ObjectFile *(*ObjectFileCreateInstance)(
53 const lldb::ModuleSP &module_sp, lldb::DataExtractorSP extractor_sp,
54 lldb::offset_t data_offset, const FileSpec *file,
55 lldb::offset_t file_offset, 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);
86 Target &target);
88 Debugger &debugger);
89typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
91 lldb::StackFrameListSP input_frames,
93typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
95 lldb::StackFrameListSP input_frames,
96 const std::vector<lldb_private::ThreadSpec> &thread_specs);
97typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
98typedef SymbolVendor *(*SymbolVendorCreateInstance)(
99 const lldb::ModuleSP &module_sp,
101 *feedback_strm); // Module can be NULL for default system symbol vendor
102typedef SymbolLocator *(*SymbolLocatorCreateInstance)();
103typedef std::optional<ModuleSpec> (*SymbolLocatorLocateExecutableObjectFile)(
104 const ModuleSpec &module_spec);
105typedef std::optional<FileSpec> (*SymbolLocatorFindSymbolFileInBundle)(
106 const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch);
107typedef std::optional<FileSpec> (*SymbolLocatorLocateExecutableSymbolFile)(
108 const ModuleSpec &module_spec, const FileSpecList &default_search_paths);
110 ModuleSpec &module_spec, Status &error, bool force_lookup,
111 bool copy_executable);
113 std::function<bool(void *baton, StoppointCallbackContext *context,
114 lldb::user_id_t break_id, lldb::user_id_t break_loc_id)>;
115
116typedef bool (*WatchpointHitCallback)(void *baton,
118 lldb::user_id_t watch_id);
120 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
121 Status &status, void *baton);
123 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
124 Status &status, void *baton);
125typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
127 const lldb::ProcessSP &process_sp);
130 const lldb::ProcessSP &process_sp);
132 lldb::LanguageType language, Module *module, Target *target);
134 lldb::LanguageType language,
135 Debugger *debugger, Target *target,
136 const char *repl_options);
139typedef int (*ComparisonFunction)(const void *, const void *);
140typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
141/// Trace
142/// \{
143typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceFromBundle)(
144 const llvm::json::Value &trace_bundle_description,
145 llvm::StringRef session_file_dir, lldb_private::Debugger &debugger);
146typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)(
147 Process &process);
148typedef llvm::Expected<lldb::TraceExporterUP> (*TraceExporterCreateInstance)();
150 CommandInterpreter &interpreter);
151/// \}
152} // namespace lldb_private
153
154#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.
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
A file collection class.
A file utility class.
Definition FileSpec.h:57
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:90
A plug-in interface definition class for object containers.
A plug-in interface definition class for object file parsers.
Definition ObjectFile.h:46
A plug-in interface definition class for halted OS helpers.
A plug-in interface definition class for debugging a process.
Definition Process.h:354
An error handling class.
Definition Status.h:118
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:51
A plug-in interface definition class for system runtimes.
Represents UUID's of various sizes.
Definition UUID.h:27
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::RegisterTypeBuilderSP(* RegisterTypeBuilderCreateInstance)(Target &target)
lldb::ProtocolServerUP(* ProtocolServerCreateInstance)()
lldb::InstrumentationRuntimeType(* InstrumentationRuntimeGetType)()
llvm::Expected< lldb::TraceSP >(* TraceCreateInstanceFromBundle)(const llvm::json::Value &trace_bundle_description, llvm::StringRef session_file_dir, lldb_private::Debugger &debugger)
Trace.
int(* ComparisonFunction)(const void *, const void *)
lldb::DisassemblerSP(* DisassemblerCreateInstance)(const ArchSpec &arch, const char *flavor, const char *cpu, const char *features)
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::ScriptInterpreterSP(* ScriptInterpreterCreateInstance)(Debugger &debugger)
lldb::PlatformSP(* PlatformCreateInstance)(bool force, const ArchSpec *arch)
bool(* ScriptedInterfaceCreateInstance)(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
lldb::ProcessSP(* ProcessCreateInstance)(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
lldb::TypeSystemSP(* TypeSystemCreateInstance)(lldb::LanguageType language, Module *module, Target *target)
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::StructuredDataPluginSP(* StructuredDataPluginCreateInstance)(Process &process)
lldb::JITLoaderSP(* JITLoaderCreateInstance)(Process *process, bool force)
llvm::Expected< lldb::SyntheticFrameProviderSP >(* SyntheticFrameProviderCreateInstance)(lldb::StackFrameListSP input_frames, const std::vector< lldb_private::ThreadSpec > &thread_specs)
lldb::REPLSP(* REPLCreateInstance)(Status &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
llvm::Expected< lldb::TraceExporterUP >(* TraceExporterCreateInstance)()
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)
std::function< bool(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)> BreakpointHitCallback
lldb::ABISP(* ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch)
llvm::Expected< lldb::SyntheticFrameProviderSP >(* ScriptedFrameProviderCreateInstance)(lldb::StackFrameListSP input_frames, const lldb_private::ScriptedFrameProviderDescriptor &descriptor)
lldb::CommandObjectSP(* ThreadTraceExportCommandCreator)(CommandInterpreter &interpreter)
lldb::InstrumentationRuntimeSP(* InstrumentationRuntimeCreateInstance)(const lldb::ProcessSP &process_sp)
ScriptLanguage
Script interpreter types.
std::shared_ptr< lldb_private::TypeSystem > TypeSystemSP
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::ABI > ABISP
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
std::unique_ptr< lldb_private::ProtocolServer > ProtocolServerUP
std::shared_ptr< lldb_private::Platform > PlatformSP
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
std::shared_ptr< lldb_private::RegisterTypeBuilder > RegisterTypeBuilderSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::MemoryHistory > MemoryHistorySP
std::shared_ptr< lldb_private::StructuredDataPlugin > StructuredDataPluginSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::BreakpointPrecondition > BreakpointPreconditionSP
InstrumentationRuntimeType
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
std::shared_ptr< lldb_private::Listener > ListenerSP
uint64_t user_id_t
Definition lldb-types.h:82
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::JITLoader > JITLoaderSP
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::InstrumentationRuntime > InstrumentationRuntimeSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::StackFrameList > StackFrameListSP
std::shared_ptr< lldb_private::REPL > REPLSP
This struct contains the metadata needed to instantiate a frame provider and optional filters to cont...