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"
46 llvm::InitializeAllTargets();
47 llvm::InitializeAllAsmPrinters();
48 llvm::InitializeAllTargetMCs();
49 llvm::InitializeAllDisassemblers();
56 const char *arg0 =
"lldb";
57 llvm::cl::ParseCommandLineOptions(1, &arg0);
59#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
60#include "Plugins/Plugins.def"
80 llvm::sys::DynamicLibrary dynlib =
81 llvm::sys::DynamicLibrary::getPermanentLibrary(spec.GetPath().c_str());
82 if (dynlib.isValid()) {
90 LLDBCommandPluginInit init_func =
91 (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
92 "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
94 if (init_func(debugger_sb))
98 "plug-in refused to load "
99 "(lldb::PluginInitialize(lldb::SBDebugger) "
103 "plug-in is missing the required initialization: "
104 "lldb::PluginInitialize(lldb::SBDebugger)");
109 "this file does not represent a loadable dylib");
113 return llvm::sys::DynamicLibrary();
118 return llvm::Error::success();
132#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
133#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.
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()
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