Andrew Walbran | 3d2c197 | 2020-04-07 12:24:26 +0100 | [diff] [blame^] | 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 liblldb_lldb_private_interfaces_h_ |
| 10 | #define liblldb_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-types.h" |
| 17 | |
| 18 | #include "lldb/lldb-private-enumerations.h" |
| 19 | |
| 20 | #include <set> |
| 21 | |
| 22 | namespace lldb_private { |
| 23 | typedef lldb::ABISP (*ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch); |
| 24 | typedef Disassembler *(*DisassemblerCreateInstance)(const ArchSpec &arch, |
| 25 | const char *flavor); |
| 26 | typedef DynamicLoader *(*DynamicLoaderCreateInstance)(Process *process, |
| 27 | bool force); |
| 28 | typedef lldb::JITLoaderSP (*JITLoaderCreateInstance)(Process *process, |
| 29 | bool force); |
| 30 | typedef ObjectContainer *(*ObjectContainerCreateInstance)( |
| 31 | const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, |
| 32 | lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, |
| 33 | lldb::offset_t length); |
| 34 | typedef size_t (*ObjectFileGetModuleSpecifications)( |
| 35 | const FileSpec &file, lldb::DataBufferSP &data_sp, |
| 36 | lldb::offset_t data_offset, lldb::offset_t file_offset, |
| 37 | lldb::offset_t length, ModuleSpecList &module_specs); |
| 38 | typedef ObjectFile *(*ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp, |
| 39 | lldb::DataBufferSP &data_sp, |
| 40 | lldb::offset_t data_offset, |
| 41 | const FileSpec *file, |
| 42 | lldb::offset_t file_offset, |
| 43 | lldb::offset_t length); |
| 44 | typedef ObjectFile *(*ObjectFileCreateMemoryInstance)( |
| 45 | const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, |
| 46 | const lldb::ProcessSP &process_sp, lldb::addr_t offset); |
| 47 | typedef bool (*ObjectFileSaveCore)(const lldb::ProcessSP &process_sp, |
| 48 | const FileSpec &outfile, Status &error); |
| 49 | typedef EmulateInstruction *(*EmulateInstructionCreateInstance)( |
| 50 | const ArchSpec &arch, InstructionType inst_type); |
| 51 | typedef OperatingSystem *(*OperatingSystemCreateInstance)(Process *process, |
| 52 | bool force); |
| 53 | typedef Language *(*LanguageCreateInstance)(lldb::LanguageType language); |
| 54 | typedef LanguageRuntime *(*LanguageRuntimeCreateInstance)( |
| 55 | Process *process, lldb::LanguageType language); |
| 56 | typedef lldb::CommandObjectSP (*LanguageRuntimeGetCommandObject)( |
| 57 | CommandInterpreter &interpreter); |
| 58 | typedef lldb::BreakpointPreconditionSP ( |
| 59 | *LanguageRuntimeGetExceptionPrecondition)(lldb::LanguageType language, |
| 60 | bool throw_bp); |
| 61 | typedef lldb::StructuredDataPluginSP (*StructuredDataPluginCreateInstance)( |
| 62 | Process &process); |
| 63 | typedef Status (*StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info, |
| 64 | Target *target); |
| 65 | typedef SystemRuntime *(*SystemRuntimeCreateInstance)(Process *process); |
| 66 | typedef lldb::PlatformSP (*PlatformCreateInstance)(bool force, |
| 67 | const ArchSpec *arch); |
| 68 | typedef lldb::ProcessSP (*ProcessCreateInstance)( |
| 69 | lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, |
| 70 | const FileSpec *crash_file_path); |
| 71 | typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)( |
| 72 | Debugger &debugger); |
| 73 | typedef SymbolFile *(*SymbolFileCreateInstance)(ObjectFile *obj_file); |
| 74 | typedef SymbolVendor *(*SymbolVendorCreateInstance)( |
| 75 | const lldb::ModuleSP &module_sp, |
| 76 | lldb_private::Stream |
| 77 | *feedback_strm); // Module can be NULL for default system symbol vendor |
| 78 | typedef bool (*BreakpointHitCallback)(void *baton, |
| 79 | StoppointCallbackContext *context, |
| 80 | lldb::user_id_t break_id, |
| 81 | lldb::user_id_t break_loc_id); |
| 82 | typedef bool (*WatchpointHitCallback)(void *baton, |
| 83 | StoppointCallbackContext *context, |
| 84 | lldb::user_id_t watch_id); |
| 85 | typedef void (*OptionValueChangedCallback)(void *baton, |
| 86 | OptionValue *option_value); |
| 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 void (*TypeSystemEnumerateSupportedLanguages)( |
| 106 | std::set<lldb::LanguageType> &languages_for_types, |
| 107 | std::set<lldb::LanguageType> &languages_for_expressions); |
| 108 | typedef void (*REPLEnumerateSupportedLanguages)( |
| 109 | std::set<lldb::LanguageType> &languages); |
| 110 | typedef int (*ComparisonFunction)(const void *, const void *); |
| 111 | typedef void (*DebuggerInitializeCallback)(Debugger &debugger); |
| 112 | |
| 113 | } // namespace lldb_private |
| 114 | |
| 115 | #endif // #if defined(__cplusplus) |
| 116 | |
| 117 | #endif // liblldb_lldb_private_interfaces_h_ |