16#include "lldb/Host/Config.h"
23#include "llvm/Support/CommandLine.h"
24#include "llvm/Support/TargetSelect.h"
31#pragma clang diagnostic push
32#pragma clang diagnostic ignored "-Wglobal-constructors"
33#include "llvm/ExecutionEngine/MCJIT.h"
34#pragma clang diagnostic pop
38#define LLDB_PLUGIN(p) LLDB_PLUGIN_DECLARE(p)
39#include "Plugins/Plugins.def"
58 llvm::Expected<ScriptInterpreterRuntimeLoader &> python_loader =
61 return python_loader.takeError();
62 if (llvm::Error err = python_loader->Load())
67 llvm::InitializeAllTargets();
68 llvm::InitializeAllAsmPrinters();
69 llvm::InitializeAllTargetMCs();
70 llvm::InitializeAllDisassemblers();
77 const char *arg0 =
"lldb";
78 llvm::cl::ParseCommandLineOptions(1, &arg0);
80#define LLDB_PLUGIN(p) LLDB_PLUGIN_INITIALIZE(p);
81#include "Plugins/Plugins.def"
101 llvm::sys::DynamicLibrary dynlib =
102 llvm::sys::DynamicLibrary::getPermanentLibrary(spec.GetPath().c_str());
103 if (dynlib.isValid()) {
111 LLDBCommandPluginInit init_func =
112 (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
113 "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
115 if (init_func(debugger_sb))
119 "plug-in refused to load "
120 "(lldb::PluginInitialize(lldb::SBDebugger) "
124 "plug-in is missing the required initialization: "
125 "lldb::PluginInitialize(lldb::SBDebugger)");
130 "this file does not represent a loadable dylib");
134 return llvm::sys::DynamicLibrary();
147 return llvm::Error::success();
161#define LLDB_PLUGIN(p) LLDB_PLUGIN_TERMINATE(p);
162#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 bool GetCategory(ConstString category, lldb::TypeCategoryImplSP &entry, bool allow_create=true)
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 llvm::Expected< ScriptInterpreterRuntimeLoader & > Get(lldb::ScriptLanguage language)
Returns the loader for language.
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).
@ eLanguageTypeObjC_plus_plus
Objective-C++.
@ eLanguageTypeSwift
Swift.
@ eLanguageTypeObjC
Objective-C.
@ eLanguageTypeC_plus_plus
ISO C++:1998.
std::shared_ptr< lldb_private::Debugger > DebuggerSP
std::shared_ptr< lldb_private::TypeCategoryImpl > TypeCategoryImplSP