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)(const lldb::ModuleSP &module_sp,
53 lldb::DataBufferSP data_sp,
54 lldb::offset_t data_offset,
55 const FileSpec *file,
56 lldb::offset_t file_offset,
57 lldb::offset_t length);
58typedef ObjectFile *(*ObjectFileCreateMemoryInstance)(
59 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
60 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
61typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp,
63 Status &error);
64typedef EmulateInstruction *(*EmulateInstructionCreateInstance)(
65 const ArchSpec &arch, InstructionType inst_type);
66typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process,
67 bool force);
68typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language);
69typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)(
70 Process *process, lldb::LanguageType language);
72 CommandInterpreter &interpreter);
75 bool throw_bp);
77 Process &process);
79 Target *target);
80typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
82 const ArchSpec *arch);
84 lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
85 const FileSpec *crash_file_path, bool can_connect);
88 Target &target);
90 Debugger &debugger);
91typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
93 lldb::StackFrameListSP input_frames,
95typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
97 lldb::StackFrameListSP input_frames,
98 const std::vector<lldb_private::ThreadSpec> &thread_specs);
99typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
100typedef SymbolVendor *(*SymbolVendorCreateInstance)(
101 const lldb::ModuleSP &module_sp,
103 *feedback_strm); // Module can be NULL for default system symbol vendor
104typedef SymbolLocator *(*SymbolLocatorCreateInstance)();
105typedef std::optional<ModuleSpec> (*SymbolLocatorLocateExecutableObjectFile)(
106 const ModuleSpec &module_spec);
107typedef std::optional<FileSpec> (*SymbolLocatorFindSymbolFileInBundle)(
108 const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch);
109typedef std::optional<FileSpec> (*SymbolLocatorLocateExecutableSymbolFile)(
110 const ModuleSpec &module_spec, const FileSpecList &default_search_paths);
112 ModuleSpec &module_spec, Status &error, bool force_lookup,
113 bool copy_executable);
115 std::function<bool(void *baton, StoppointCallbackContext *context,
116 lldb::user_id_t break_id, lldb::user_id_t break_loc_id)>;
117
118typedef bool (*WatchpointHitCallback)(void *baton,
120 lldb::user_id_t watch_id);
122 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
123 Status &status, void *baton);
125 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
126 Status &status, void *baton);
127typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
129 const lldb::ProcessSP &process_sp);
132 const lldb::ProcessSP &process_sp);
134 lldb::LanguageType language, Module *module, Target *target);
136 lldb::LanguageType language,
137 Debugger *debugger, Target *target,
138 const char *repl_options);
141typedef int (*ComparisonFunction)(const void *, const void *);
142typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
143/// Trace
144/// \{
145typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceFromBundle)(
146 const llvm::json::Value &trace_bundle_description,
147 llvm::StringRef session_file_dir, lldb_private::Debugger &debugger);
148typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)(
149 Process &process);
150typedef llvm::Expected<lldb::TraceExporterUP> (*TraceExporterCreateInstance)();
152 CommandInterpreter &interpreter);
153/// \}
154} // namespace lldb_private
155
156#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:45
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)
llvm::Expected< lldb::SyntheticFrameProviderSP >(* ScriptedFrameProviderCreateInstance)(lldb::StackFrameListSP input_frames, const lldb_private::SyntheticFrameProviderDescriptor &descriptor)
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)
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::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...