15#include "lldb/Host/Config.h"
22#include "llvm/Support/CommandLine.h"
23#include "llvm/Support/TargetSelect.h"
25#pragma clang diagnostic push
26#pragma clang diagnostic ignored "-Wglobal-constructors"
27#include "llvm/ExecutionEngine/MCJIT.h"
28#pragma clang diagnostic pop
32#define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
33#include "Plugins/Plugins.def"
38constexpr lldb_private::HostInfo::SharedLibraryDirectoryHelper
40 lldb_private::ScriptInterpreterPython::SharedLibraryDirectoryHelper;
43constexpr lldb_private::HostInfo::SharedLibraryDirectoryHelper
59 llvm::InitializeAllTargets();
60 llvm::InitializeAllAsmPrinters();
61 llvm::InitializeAllTargetMCs();
62 llvm::InitializeAllDisassemblers();
69 const char *arg0 =
"lldb";
70 llvm::cl::ParseCommandLineOptions(1, &arg0);
72#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
73#include "Plugins/Plugins.def"
93 llvm::sys::DynamicLibrary dynlib =
94 llvm::sys::DynamicLibrary::getPermanentLibrary(spec.GetPath().c_str());
95 if (dynlib.isValid()) {
103 LLDBCommandPluginInit init_func =
104 (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
105 "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
107 if (init_func(debugger_sb))
111 "plug-in refused to load "
112 "(lldb::PluginInitialize(lldb::SBDebugger) "
116 "plug-in is missing the required initialization: "
117 "lldb::PluginInitialize(lldb::SBDebugger)");
122 "this file does not represent a loadable dylib");
126 return llvm::sys::DynamicLibrary();
131 return llvm::Error::success();
145#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
146#include "Plugins/Plugins.def"
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
constexpr lldb_private::HostInfo::SharedLibraryDirectoryHelper * g_shlib_dir_helper
static void AssertCallback(llvm::StringRef message, llvm::StringRef backtrace, llvm::StringRef prompt)
static void SettingsInitialize()
static void Initialize(LoadPluginCallbackType load_plugin_callback)
static void SettingsTerminate()
static FileSystem & Instance()
static Status FromErrorString(const char *str)
SystemInitializerCommon(HostInfo::SharedLibraryDirectoryHelper *helper)
llvm::Error Initialize() override
void Terminate() override
~SystemInitializerFull() override
llvm::Error Initialize() override
void Terminate() override
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
void SetLLDBAssertCallback(LLDBAssertCallback callback)
Replace the LLDB assert callback.
const char * GetVersion()
Retrieves a string representing the complete LLDB version, which includes the lldb version number,...
void SetLLDBErrorLog(Log *log)
Getter and setter for the error log (see g_error_log).
std::shared_ptr< lldb_private::Debugger > DebuggerSP