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
12#if defined(__cplusplus)
13
14#include "lldb/lldb-enumerations.h"
15#include "lldb/lldb-forward.h"
16#include "lldb/lldb-private-enumerations.h"
17#include "lldb/lldb-types.h"
18#include <memory>
19#include <set>
20
21namespace llvm {
22namespace json {
23class Object;
24class Value;
25}
26} // namespace llvm
27
28namespace lldb_private {
29typedef lldb::ABISP (*ABICreateInstance)(lldb::ProcessSP process_sp,
30 const ArchSpec &arch);
31typedef std::unique_ptr<Architecture> (*ArchitectureCreateInstance)(
32 const ArchSpec &arch);
33typedef Disassembler *(*DisassemblerCreateInstance)(const ArchSpec &arch,
34 const char *flavor);
35typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process,
36 bool force);
37typedef lldb::JITLoaderSP (*JITLoaderCreateInstance)(Process *process,
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 size_t (*ObjectFileGetModuleSpecifications)(
44 const FileSpec &file, lldb::DataBufferSP &data_sp,
45 lldb::offset_t data_offset, lldb::offset_t file_offset,
46 lldb::offset_t length, ModuleSpecList &module_specs);
47typedef ObjectFile *(*ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp,
48 lldb::DataBufferSP &data_sp,
49 lldb::offset_t data_offset,
50 const FileSpec *file,
51 lldb::offset_t file_offset,
52 lldb::offset_t length);
53typedef ObjectFile *(*ObjectFileCreateMemoryInstance)(
54 const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp,
55 const lldb::ProcessSP &process_sp, lldb::addr_t offset);
56typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp,
57 const FileSpec &outfile, Status &error);
58typedef EmulateInstruction *(*EmulateInstructionCreateInstance)(
59 const ArchSpec &arch, InstructionType inst_type);
60typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process,
61 bool force);
62typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language);
63typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)(
64 Process *process, lldb::LanguageType language);
65typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject)(
66 CommandInterpreter &interpreter);
67typedef lldb::BreakpointPreconditionSP (
68 *LanguageRuntimeGetExceptionPrecondition)(lldb::LanguageType language,
69 bool throw_bp);
70typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)(
71 Process &process);
72typedef Status (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info,
73 Target *target);
74typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process);
75typedef lldb::PlatformSP (*PlatformCreateInstance)(bool force,
76 const ArchSpec *arch);
77typedef lldb::ProcessSP (*ProcessCreateInstance)(
78 lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
79 const FileSpec *crash_file_path, bool can_connect);
80typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)(
81 Debugger &debugger);
82typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
83typedef SymbolVendor *(*SymbolVendorCreateInstance)(
84 const lldb::ModuleSP &module_sp,
85 lldb_private::Stream
86 *feedback_strm); // Module can be NULL for default system symbol vendor
87typedef bool (*BreakpointHitCallback)(void *baton,
88 StoppointCallbackContext *context,
89 lldb::user_id_t break_id,
90 lldb::user_id_t break_loc_id);
91typedef bool (*WatchpointHitCallback)(void *baton,
92 StoppointCallbackContext *context,
93 lldb::user_id_t watch_id);
94typedef bool (*ThreadPlanShouldStopHereCallback)(
95 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
96 Status &status, void *baton);
97typedef lldb::ThreadPlanSP (*ThreadPlanStepFromHereCallback)(
98 ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
99 Status &status, void *baton);
100typedef UnwindAssembly *(*UnwindAssemblyCreateInstance)(const ArchSpec &arch);
101typedef lldb::MemoryHistorySP (*MemoryHistoryCreateInstance)(
102 const lldb::ProcessSP &process_sp);
103typedef lldb::InstrumentationRuntimeType (*InstrumentationRuntimeGetType)();
104typedef lldb::InstrumentationRuntimeSP (*InstrumentationRuntimeCreateInstance)(
105 const lldb::ProcessSP &process_sp);
106typedef lldb::TypeSystemSP (*TypeSystemCreateInstance)(
107 lldb::LanguageType language, Module *module, Target *target);
108typedef lldb::REPLSP (*REPLCreateInstance)(Status &error,
109 lldb::LanguageType language,
110 Debugger *debugger, Target *target,
111 const char *repl_options);
112typedef int (*ComparisonFunction)(const void *, const void *);
113typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
114typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForSessionFile)(
115 const llvm::json::Value &trace_session_file,
116 llvm::StringRef session_file_dir, lldb_private::Debugger &debugger);
117typedef llvm::Expected<lldb::TraceSP> (*TraceCreateInstanceForLiveProcess)(
118 Process &process);
119} // namespace lldb_private
120
121#endif // #if defined(__cplusplus)
122
123#endif // LLDB_LLDB_PRIVATE_INTERFACES_H
124