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 {
30class Highlighter;
32 const ArchSpec &arch);
33typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
34 const ArchSpec &arch);
36 const ArchSpec &arch, const char *flavor, const char *cpu,
37 const char *features);
38typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
39 bool force);
41 bool force);
42typedef ObjectContainer *(*ObjectContainerCreateInstance)(
43 const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
44 lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset,
45 lldb::offset_t length);
46typedef ObjectContainer *(*ObjectContainerCreateMemoryInstance)(
47 const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp,
48 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
50 const FileSpec &file, lldb::DataExtractorSP &extractor_sp,
51 lldb::offset_t file_offset, lldb::offset_t length);
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);
90typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
92 lldb::StackFrameListSP input_frames,
94typedef llvm::Expected<lldb::SyntheticFrameProviderSP> (
96 lldb::StackFrameListSP input_frames,
97 const std::vector<lldb_private::ThreadSpec> &thread_specs);
98typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
99typedef SymbolVendor *(*SymbolVendorCreateInstance)(
100 const lldb::ModuleSP &module_sp,
102 *feedback_strm); // Module can be NULL for default system symbol vendor
103typedef SymbolLocator *(*SymbolLocatorCreateInstance)();
104typedef std::optional<ModuleSpec> (*SymbolLocatorLocateExecutableObjectFile)(
105 const ModuleSpec &module_spec);
106typedef std::optional<FileSpec> (*SymbolLocatorFindSymbolFileInBundle)(
107 const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch);
108typedef std::optional<FileSpec> (*SymbolLocatorLocateExecutableSymbolFile)(
109 const ModuleSpec &module_spec, const FileSpecList &default_search_paths);
111 ModuleSpec &module_spec, Status &error, bool force_lookup,
112 bool copy_executable);
114 std::function<bool(void *baton, StoppointCallbackContext *context,
115 lldb::user_id_t break_id, lldb::user_id_t break_loc_id)>;
116
117typedef bool (*WatchpointHitCallback)(void *baton,
119 lldb::user_id_t watch_id);
121 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
122 Status &status, void *baton);
124 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
125 Status &status, void *baton);
126typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
128 const lldb::ProcessSP &process_sp);
131 const lldb::ProcessSP &process_sp);
133 lldb::LanguageType language, Module *module, Target *target);
135 lldb::LanguageType language,
136 Debugger *debugger, Target *target,
137 const char *repl_options);
140
141typedef Highlighter *(*HighlighterCreateInstance)(lldb::LanguageType language);
142typedef int (*ComparisonFunction)(const void *, const void *);
143typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
144/// Trace
145/// \{
146typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceFromBundle)(
147 const llvm::json::Value &trace_bundle_description,
148 llvm::StringRef session_file_dir, lldb_private::Debugger &debugger);
149typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)(
150 Process &process);
151typedef llvm::Expected<lldb::TraceExporterUP> (*TraceExporterCreateInstance)();
153 CommandInterpreter &interpreter);
154/// \}
155} // namespace lldb_private
156
157#endif // LLDB_LLDB_PRIVATE_INTERFACES_H
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
Definition ArchSpec.h:32
A class to manage flag bits.
Definition Debugger.h:101
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
Annotates source code with color attributes.
Definition Highlighter.h:96
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)
FileSpec(* ScriptInterpreterGetPath)()
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)
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)
ModuleSpecList(* ObjectFileGetModuleSpecifications)(const FileSpec &file, lldb::DataExtractorSP &extractor_sp, lldb::offset_t file_offset, lldb::offset_t length)
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...