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