lldb-private-interfaces.h 6.3 KB

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