20#include "llvm/ADT/StringRef.h"
21#include "llvm/ADT/Twine.h"
22#include "llvm/Support/DynamicLibrary.h"
23#include "llvm/Support/ErrorExtras.h"
24#include "llvm/Support/FileSystem.h"
25#include "llvm/Support/raw_ostream.h"
55 library = std::move(other.library);
80 static std::recursive_mutex g_plugin_map_mutex;
81 return g_plugin_map_mutex;
98 assert(!plugin_map.contains(plugin_file_spec));
99 plugin_map.try_emplace(plugin_file_spec, std::move(plugin_info));
102template <
typename FPtrTy>
static FPtrTy
CastToFPtr(
void *VPtr) {
103 return reinterpret_cast<FPtrTy
>(VPtr);
131 plugin_info.
library = llvm::sys::DynamicLibrary::getPermanentLibrary(
133 if (!plugin_info.
library.isValid())
134 return llvm::createStringError(
error);
139 llvm::StringRef file_name =
142 llvm::StringRef plugin_name = file_name.substr(
g_plugin_prefix.size());
143 std::string init_symbol =
144 llvm::Twine(
"lldb_initialize_" + plugin_name).str();
147 plugin_info.
library.getAddressOfSymbol(init_symbol.c_str()))) {
149 return llvm::createStringErrorV(
"initializer '{0}' returned false",
151 const std::string term_symbol =
152 llvm::Twine(
"lldb_terminate_" + plugin_name).str();
154 plugin_info.
library.getAddressOfSymbol(term_symbol.c_str()));
161 plugin_info.
library.getAddressOfSymbol(
"LLDBPluginInitialize"))) {
163 return llvm::createStringError(
164 "initializer 'LLDBPluginInitialize' returned false");
168 plugin_info.
library.getAddressOfSymbol(
"LLDBPluginTerminate"));
172 return llvm::createStringError(
"no initialize symbol found");
177 llvm::StringRef path) {
178 namespace fs = llvm::sys::fs;
180 static constexpr std::array<llvm::StringLiteral, 3>
181 g_shared_library_extension = {
".dylib",
".so",
".dll"};
187 if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
188 ft == fs::file_type::type_unknown) {
193 if (!llvm::is_contained(g_shared_library_extension,
209 llvm::Expected<PluginInfo> plugin_info =
218 "could not load plugin: {0}");
224 if (ft == fs::file_type::directory_file ||
225 ft == fs::file_type::symlink_file || ft == fs::file_type::type_unknown) {
237 static const bool find_directories =
true;
238 static const bool find_files =
true;
239 static const bool find_other =
true;
245 const std::array<PluginDir, 3> plugin_dirs = {
250 for (
const PluginDir &plugin_dir : plugin_dirs) {
253 plugin_dir.path.GetPath().c_str(), find_directories, find_files,
292 "emulate-instruction",
298 "instrumentation-runtime",
364 "register-type-builder",
370 "script-interpreter",
376 "scripted-interface",
436 return PluginNamespaces;
440 llvm::json::Object plugin_stats;
443 llvm::json::Array namespace_stats;
447 llvm::json::Object plugin_json;
448 plugin_json.try_emplace(
"name",
plugin.name);
449 plugin_json.try_emplace(
"enabled",
plugin.enabled);
450 namespace_stats.emplace_back(std::move(plugin_json));
453 if (!namespace_stats.empty())
454 plugin_stats.try_emplace(plugin_ns.name, std::move(namespace_stats));
468 if (pattern == plugin_ns.
name)
472 std::string qualified_name = (plugin_ns.
name +
"." + plugin_info.
name).str();
473 return pattern == qualified_name;
499 llvm::errs() << llvm::formatv(
"Use `image lookup -va {0:x}` to find out "
500 "which callback was not removed\n",
501 instance.create_callback);
503 assert(
m_instances.empty() &&
"forgot to unregister plugin?");
506 template <
typename...
Args>
508 typename Instance::CallbackType callback,
512 assert(!name.empty());
514 std::lock_guard<std::mutex> guard(
m_mutex);
515 m_instances.emplace_back(name, description, callback,
516 std::forward<Args>(args)...);
524 std::lock_guard<std::mutex> guard(
m_mutex);
527 for (; pos != end; ++pos) {
528 if (pos->create_callback == callback) {
538 return instance->description;
544 return instance->name;
550 return instance->create_callback;
555 llvm::SmallVector<Instance> snapshot =
GetSnapshot();
556 llvm::SmallVector<typename Instance::CallbackType> result;
557 result.reserve(snapshot.size());
558 for (
const auto &instance : snapshot)
559 result.push_back(instance.create_callback);
565 if (instance.debugger_init_callback)
566 instance.debugger_init_callback(debugger);
574 llvm::SmallVector<Instance>
GetSnapshot(
bool enabled_only =
true)
const {
575 std::lock_guard<std::mutex> guard(
m_mutex);
577 llvm::SmallVector<Instance> enabled_instances;
580 if (!enabled_only || instance.enabled)
581 enabled_instances.push_back(instance);
583 return enabled_instances;
590 [&](
const Instance &instance) {
return count++ == idx; });
594 bool enabled_only =
true) {
598 auto predicate = [&](
const Instance &instance) {
599 return instance.name == name;
607 std::optional<Instance>
610 if (predicate(instance))
616 std::optional<Instance>
618 std::lock_guard<std::mutex> guard(
m_mutex);
620 if (predicate(instance))
631 std::lock_guard<std::mutex> guard(
m_mutex);
634 llvm::SmallVector<RegisteredPluginInfo> plugin_infos;
638 plugin_infos.push_back(
639 {instance.name, instance.description, instance.enabled});
645 std::lock_guard<std::mutex> guard(
m_mutex);
646 auto it = llvm::find_if(
m_instances, [&](
const Instance &instance) {
647 return instance.name == name;
653 it->enabled = enable;
673 llvm::StringRef description,
686#pragma mark Architecture
697 llvm::StringRef description,
705 instances.UnregisterPlugin(create_callback);
708std::unique_ptr<Architecture>
711 if (
auto plugin_up = instances.create_callback(arch))
717#pragma mark Disassembler
728 llvm::StringRef description,
739llvm::SmallVector<DisassemblerCreateInstance>
746 llvm::StringRef name) {
750#pragma mark DynamicLoader
761 llvm::StringRef name, llvm::StringRef description,
765 name, description, create_callback, debugger_init_callback);
773llvm::SmallVector<DynamicLoaderCreateInstance>
780 llvm::StringRef name) {
784#pragma mark JITLoader
795 llvm::StringRef name, llvm::StringRef description,
799 name, description, create_callback, debugger_init_callback);
806llvm::SmallVector<JITLoaderCreateInstance>
811#pragma mark EmulateInstruction
823 llvm::StringRef name, llvm::StringRef description,
834llvm::SmallVector<EmulateInstructionCreateInstance>
841 llvm::StringRef name) {
845#pragma mark OperatingSystem
856 llvm::StringRef name, llvm::StringRef description,
860 name, description, create_callback, debugger_init_callback);
868llvm::SmallVector<OperatingSystemCreateInstance>
875 llvm::StringRef name) {
890 llvm::StringRef name, llvm::StringRef description,
894 name, description, create_callback, debugger_init_callback);
901llvm::SmallVector<LanguageCreateInstance>
906#pragma mark LanguageRuntime
933 llvm::StringRef name, llvm::StringRef description,
938 name, description, create_callback,
nullptr, command_callback,
939 precondition_callback);
947llvm::SmallVector<LanguageRuntimeCallbacks>
950 llvm::SmallVector<LanguageRuntimeCallbacks> result;
951 result.reserve(instances.size());
952 for (
auto &instance : instances)
953 result.push_back({instance.create_callback, instance.command_callback,
954 instance.precondition_callback});
958#pragma mark SystemRuntime
969 llvm::StringRef name, llvm::StringRef description,
980llvm::SmallVector<SystemRuntimeCreateInstance>
985#pragma mark ObjectFile
1020 llvm::StringRef name, llvm::StringRef description,
1027 name, description, create_callback, create_memory_callback,
1028 get_module_specifications, save_core, debugger_init_callback);
1037 llvm::SmallVector<ObjectFileCallbacks> result;
1038 result.reserve(instances.size());
1039 for (
auto &instance : instances)
1040 result.push_back({instance.create_callback, instance.create_memory_callback,
1041 instance.get_module_specifications, instance.save_core});
1047 llvm::StringRef name) {
1049 return instance->create_memory_callback;
1071 llvm::Expected<bool> ret =
1080 const auto &plugin_name = options.
GetPluginName().value_or(
"");
1082 for (
auto &instance : instances) {
1083 if (plugin_name.empty() || instance.name == plugin_name) {
1086 if (instance.save_core &&
1098 if (!plugin_name.empty())
1100 "The \"{}\" plugin is not able to save a core for this process.",
1104 "no ObjectFile plugins were able to save a core for this process");
1108 llvm::SmallVector<llvm::StringRef> plugin_names;
1110 for (
auto &instance : instances) {
1111 if (instance.save_core)
1112 plugin_names.emplace_back(instance.name);
1114 return plugin_names;
1117#pragma mark ObjectContainer
1142 llvm::StringRef name, llvm::StringRef description,
1147 name, description, create_callback, create_memory_callback,
1148 get_module_specifications);
1156llvm::SmallVector<ObjectContainerCallbacks>
1159 llvm::SmallVector<ObjectContainerCallbacks> result;
1160 result.reserve(instances.size());
1161 for (
auto &instance : instances)
1162 result.push_back({instance.create_callback, instance.create_memory_callback,
1163 instance.get_module_specifications});
1167#pragma mark Platform
1174 return g_platform_instances;
1178 llvm::StringRef name, llvm::StringRef description,
1182 name, description, create_callback, debugger_init_callback);
1203llvm::SmallVector<PlatformCreateInstance>
1211 if (instance.name.starts_with(name))
1227 llvm::StringRef name, llvm::StringRef description,
1231 name, description, create_callback, debugger_init_callback);
1252llvm::SmallVector<ProcessCreateInstance>
1260 if (instance.name.starts_with(name))
1265#pragma mark ProtocolServer
1276 llvm::StringRef name, llvm::StringRef description,
1297#pragma mark RegisterTypeBuilder
1307typedef PluginInstances<RegisterTypeBuilderInstance>
1316 llvm::StringRef name, llvm::StringRef description,
1333 return instance->create_callback(target);
1336#pragma mark ScriptInterpreter
1360 llvm::StringRef name, llvm::StringRef description,
1365 name, description, create_callback, script_language, get_path_callback);
1373llvm::SmallVector<ScriptInterpreterCreateInstance>
1383 for (
const auto &instance : instances) {
1385 none_instance = instance.create_callback;
1387 if (script_lang == instance.language)
1388 return instance.create_callback(debugger);
1392 assert(none_instance !=
nullptr);
1393 return none_instance(debugger);
1399 for (
const auto &instance : instances) {
1400 if (instance.language == script_lang && instance.get_path_callback)
1401 return instance.get_path_callback();
1406#pragma mark SyntheticFrameProvider
1428 llvm::StringRef name, llvm::StringRef description,
1431 if (create_native_callback)
1433 name, description, create_native_callback);
1434 else if (create_scripted_callback)
1436 name, description, create_scripted_callback);
1452 llvm::StringRef name) {
1456llvm::SmallVector<ScriptedFrameProviderCreateInstance>
1461#pragma mark StructuredDataPlugin
1486 llvm::StringRef name, llvm::StringRef description,
1491 name, description, create_callback, debugger_init_callback,
1500llvm::SmallVector<StructuredDataPluginCallbacks>
1503 llvm::SmallVector<StructuredDataPluginCallbacks> result;
1504 result.reserve(instances.size());
1505 for (
auto &instance : instances)
1506 result.push_back({instance.create_callback, instance.filter_callback});
1510#pragma mark SymbolFile
1521 llvm::StringRef name, llvm::StringRef description,
1525 name, description, create_callback, debugger_init_callback);
1532llvm::SmallVector<SymbolFileCreateInstance>
1537#pragma mark SymbolVendor
1548 llvm::StringRef description,
1559llvm::SmallVector<SymbolVendorCreateInstance>
1564#pragma mark SymbolLocator
1596 llvm::StringRef name, llvm::StringRef description,
1604 name, description, create_callback, locate_executable_object_file,
1605 locate_executable_symbol_file, download_object_symbol_file,
1606 find_symbol_file_in_bundle, debugger_init_callback);
1614llvm::SmallVector<SymbolLocatorCreateInstance>
1623 for (
auto &instance : instances) {
1624 if (instance.locate_executable_object_file) {
1626 std::optional<ModuleSpec> result;
1629 result = instance.locate_executable_object_file(module_spec);
1631 map.
add(instance.name, time.
get().count());
1643 for (
auto &instance : instances) {
1644 if (instance.locate_executable_symbol_file) {
1646 std::optional<FileSpec> result;
1649 result = instance.locate_executable_symbol_file(module_spec,
1650 default_search_paths);
1652 map.
add(instance.name, time.
get().count());
1663 bool copy_executable) {
1665 for (
auto &instance : instances) {
1666 if (instance.download_object_symbol_file) {
1667 if (instance.download_object_symbol_file(module_spec,
error, force_lookup,
1679 for (
auto &instance : instances) {
1680 if (instance.find_symbol_file_in_bundle) {
1681 std::optional<FileSpec> result =
1682 instance.find_symbol_file_in_bundle(symfile_bundle, uuid, arch);
1716 llvm::StringRef name, llvm::StringRef description,
1721 name, description, create_callback_from_bundle,
1722 create_callback_for_live_process, schema, debugger_init_callback);
1728 create_callback_from_bundle);
1738 llvm::StringRef plugin_name) {
1740 return instance->create_callback_for_live_process;
1747 return instance->schema;
1748 return llvm::StringRef();
1753 return instance->schema;
1754 return llvm::StringRef();
1757#pragma mark TraceExporter
1781 llvm::StringRef name, llvm::StringRef description,
1785 name, description, create_callback, create_thread_trace_export_command);
1798llvm::SmallVector<TraceExporterCallbacks>
1801 llvm::SmallVector<TraceExporterCallbacks> result;
1802 result.reserve(instances.size());
1803 for (
auto &instance : instances)
1804 result.push_back({instance.name, instance.create_callback,
1805 instance.create_thread_trace_export_command});
1809#pragma mark UnwindAssembly
1820 llvm::StringRef name, llvm::StringRef description,
1831llvm::SmallVector<UnwindAssemblyCreateInstance>
1836#pragma mark MemoryHistory
1847 llvm::StringRef name, llvm::StringRef description,
1858llvm::SmallVector<MemoryHistoryCreateInstance>
1863#pragma mark InstrumentationRuntime
1882 bool enabled_only) {
1884 return instance->get_type_callback;
1895 llvm::StringRef name, llvm::StringRef description,
1899 name, description, create_callback, get_type_callback);
1907llvm::SmallVector<InstrumentationRuntimeCallbacks>
1911 llvm::SmallVector<InstrumentationRuntimeCallbacks> result;
1912 result.reserve(instances.size());
1913 for (
auto &instance : instances)
1914 result.push_back({instance.create_callback, instance.get_type_callback});
1918#pragma mark TypeSystem
1943 llvm::StringRef name, llvm::StringRef description,
1946 LanguageSet supported_languages_for_expressions) {
1948 name, description, create_callback, supported_languages_for_types,
1949 supported_languages_for_expressions);
1956llvm::SmallVector<TypeSystemCreateInstance>
1964 for (
unsigned i = 0; i < instances.size(); ++i)
1965 all.
bitvector |= instances[i].supported_languages_for_types.bitvector;
1972 for (
unsigned i = 0; i < instances.size(); ++i)
1973 all.
bitvector |= instances[i].supported_languages_for_expressions.bitvector;
1977#pragma mark ScriptedInterfaces
2001 llvm::StringRef name, llvm::StringRef description,
2005 name, description, create_callback, language, usages);
2029 return instance->language;
2036 return instance->usages;
2059 llvm::StringRef description,
2063 supported_languages);
2072 llvm::SmallVector<REPLCallbacks> result;
2073 result.reserve(instances.size());
2074 for (
auto &instance : instances)
2075 result.push_back({instance.create_callback, instance.supported_languages});
2082 for (
unsigned i = 0; i < instances.size(); ++i)
2083 all.
bitvector |= instances[i].supported_languages.bitvector;
2087#pragma mark Highlighter
2104 llvm::StringRef description,
2115llvm::SmallVector<HighlighterCreateInstance>
2120#pragma mark PluginManager
2141 Debugger &debugger, llvm::StringRef plugin_type_name,
2142 llvm::StringRef plugin_type_desc,
bool can_create) {
2145 if (parent_properties_sp) {
2146 static constexpr llvm::StringLiteral g_property_name(
"plugin");
2149 parent_properties_sp->GetSubProperty(
nullptr, g_property_name);
2150 if (!plugin_properties_sp && can_create) {
2151 plugin_properties_sp =
2152 std::make_shared<OptionValueProperties>(g_property_name);
2153 plugin_properties_sp->SetExpectedPath(
"plugin");
2154 parent_properties_sp->AppendProperty(g_property_name,
2155 "Settings specify to plugins.",
true,
2156 plugin_properties_sp);
2159 if (plugin_properties_sp) {
2161 plugin_properties_sp->GetSubProperty(
nullptr, plugin_type_name);
2162 if (!plugin_type_properties_sp && can_create) {
2163 plugin_type_properties_sp =
2164 std::make_shared<OptionValueProperties>(plugin_type_name);
2165 plugin_type_properties_sp->SetExpectedPath(
2166 (
"plugin." + plugin_type_name).str());
2167 plugin_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc,
2168 true, plugin_type_properties_sp);
2170 return plugin_type_properties_sp;
2180 Debugger &debugger, llvm::StringRef plugin_type_name,
2181 llvm::StringRef plugin_type_desc,
bool can_create) {
2182 static constexpr llvm::StringLiteral g_property_name(
"plugin");
2185 if (parent_properties_sp) {
2187 parent_properties_sp->GetSubProperty(
nullptr, plugin_type_name);
2188 if (!plugin_properties_sp && can_create) {
2189 plugin_properties_sp =
2190 std::make_shared<OptionValueProperties>(plugin_type_name);
2191 plugin_properties_sp->SetExpectedPath(plugin_type_name.str());
2192 parent_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc,
2193 true, plugin_properties_sp);
2196 if (plugin_properties_sp) {
2198 plugin_properties_sp->GetSubProperty(
nullptr, g_property_name);
2199 if (!plugin_type_properties_sp && can_create) {
2200 plugin_type_properties_sp =
2201 std::make_shared<OptionValueProperties>(g_property_name);
2202 plugin_type_properties_sp->SetExpectedPath(
2203 (plugin_type_name +
".plugin").str());
2204 plugin_properties_sp->AppendProperty(g_property_name,
2205 "Settings specific to plugins",
2206 true, plugin_type_properties_sp);
2208 return plugin_type_properties_sp;
2217GetDebuggerPropertyForPluginsPtr(
Debugger &, llvm::StringRef, llvm::StringRef,
2223 llvm::StringRef plugin_type_name,
2224 GetDebuggerPropertyForPluginsPtr get_debugger_property =
2228 debugger, plugin_type_name,
2231 if (plugin_type_properties_sp)
2233 plugin_type_properties_sp->GetSubProperty(
nullptr, setting_name);
2234 return properties_sp;
2239 llvm::StringRef plugin_type_desc,
2241 llvm::StringRef description,
bool is_global_property,
2242 GetDebuggerPropertyForPluginsPtr get_debugger_property =
2244 if (properties_sp) {
2246 get_debugger_property(debugger, plugin_type_name, plugin_type_desc,
2248 if (plugin_type_properties_sp) {
2249 plugin_type_properties_sp->AppendProperty(properties_sp->GetName(),
2250 description, is_global_property,
2266static constexpr llvm::StringLiteral
2272 llvm::StringRef setting_name) {
2278 llvm::StringRef description,
bool is_global_property) {
2280 "Settings for dynamic loader plug-ins",
2281 properties_sp, description, is_global_property);
2286 llvm::StringRef setting_name) {
2293 llvm::StringRef description,
bool is_global_property) {
2295 "Settings for platform plug-ins", properties_sp,
2296 description, is_global_property,
2302 llvm::StringRef setting_name) {
2308 llvm::StringRef description,
bool is_global_property) {
2310 "Settings for process plug-ins", properties_sp,
2311 description, is_global_property);
2316 llvm::StringRef setting_name) {
2322 llvm::StringRef description,
bool is_global_property) {
2324 "Settings for symbol locator plug-ins",
2325 properties_sp, description, is_global_property);
2330 llvm::StringRef description,
bool is_global_property) {
2332 "Settings for trace plug-ins", properties_sp,
2333 description, is_global_property);
2338 llvm::StringRef setting_name) {
2344 llvm::StringRef description,
bool is_global_property) {
2346 "Settings for object file plug-ins",
2347 properties_sp, description, is_global_property);
2352 llvm::StringRef setting_name) {
2358 llvm::StringRef description,
bool is_global_property) {
2360 "Settings for symbol file plug-ins",
2361 properties_sp, description, is_global_property);
2366 llvm::StringRef setting_name) {
2372 llvm::StringRef description,
bool is_global_property) {
2374 "Settings for JIT loader plug-ins",
2375 properties_sp, description, is_global_property);
2381 Debugger &debugger, llvm::StringRef setting_name) {
2388 if (plugin_type_properties_sp)
2390 plugin_type_properties_sp->GetSubProperty(
nullptr, setting_name);
2391 return properties_sp;
2396 llvm::StringRef description,
bool is_global_property) {
2397 if (properties_sp) {
2400 "Settings for operating system plug-ins",
2402 if (plugin_type_properties_sp) {
2403 plugin_type_properties_sp->AppendProperty(properties_sp->GetName(),
2404 description, is_global_property,
2414 llvm::StringRef setting_name) {
2420 llvm::StringRef description,
bool is_global_property) {
2422 "Settings for structured data plug-ins",
2423 properties_sp, description, is_global_property);
2428 Debugger &debugger, llvm::StringRef setting_name) {
2434 llvm::StringRef description,
bool is_global_property) {
2436 "Settings for CPlusPlus language plug-ins",
2437 properties_sp, description, is_global_property);
2450llvm::SmallVector<RegisteredPluginInfo>
2459llvm::SmallVector<RegisteredPluginInfo>
2468llvm::SmallVector<RegisteredPluginInfo>
2477llvm::SmallVector<RegisteredPluginInfo>
2486llvm::SmallVector<RegisteredPluginInfo>
2500 llvm_unreachable(
"unhandled PluginDomainKind");
2504 llvm::StringRef name,
bool enable,
Debugger &requesting_debugger,
2507 return llvm::createStringErrorV(
"{} domain is not supported",
2510 return llvm::createStringError(
"plugin could not be found");
2512 return llvm::Error::success();
2515llvm::SmallVector<RegisteredPluginInfo>
2532llvm::SmallVector<RegisteredPluginInfo>
2541llvm::SmallVector<RegisteredPluginInfo>
2550llvm::SmallVector<RegisteredPluginInfo>
2559llvm::SmallVector<RegisteredPluginInfo>
2568llvm::SmallVector<RegisteredPluginInfo>
2599llvm::SmallVector<RegisteredPluginInfo>
2608llvm::SmallVector<RegisteredPluginInfo>
2617llvm::SmallVector<RegisteredPluginInfo>
2626llvm::SmallVector<RegisteredPluginInfo>
2635llvm::SmallVector<RegisteredPluginInfo>
2644llvm::SmallVector<RegisteredPluginInfo>
2653llvm::SmallVector<RegisteredPluginInfo>
2662llvm::SmallVector<RegisteredPluginInfo>
2678llvm::SmallVector<RegisteredPluginInfo>
2687llvm::SmallVector<RegisteredPluginInfo>
2696llvm::SmallVector<RegisteredPluginInfo>
2710 llvm::StringRef ns_name, plugin_prefix;
2711 std::tie(ns_name, plugin_prefix) = name.split(
'.');
2719 if (plugin_ns.name == ns_name) {
2721 llvm::SmallString<128> buf;
2722 if (
plugin.name.starts_with(plugin_prefix))
2724 (plugin_ns.name +
"." +
plugin.name).toStringRef(buf));
2726 }
else if (plugin_ns.name.starts_with(name) &&
2727 !plugin_ns.get_info().empty()) {
static llvm::raw_ostream & error(Stream &strm)
static FileSystem::EnumerateDirectoryResult LoadPluginCallback(void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
#define LLDB_LOG_ERROR(log, error,...)
static DisassemblerInstances & GetDisassemblerInstances()
PluginInstances< ProtocolServerInstance > ProtocolServerInstances
static TraceInstances & GetTracePluginInstances()
static ObjectContainerInstances & GetObjectContainerInstances()
PluginInstances< JITLoaderInstance > JITLoaderInstances
static MemoryHistoryInstances & GetMemoryHistoryInstances()
PluginInstance< PlatformCreateInstance > PlatformInstance
PluginInstances< HighlighterInstance > HighlighterInstances
static DynamicLoaderInstances & GetDynamicLoaderInstances()
PluginInstances< SymbolFileInstance > SymbolFileInstances
PluginInstances< TypeSystemInstance > TypeSystemInstances
PluginInstance< ABICreateInstance > ABIInstance
static SystemRuntimeInstances & GetSystemRuntimeInstances()
PluginInstances< TraceExporterInstance > TraceExporterInstances
static constexpr llvm::StringLiteral kPlatformPluginName("platform")
static constexpr llvm::StringLiteral g_plugin_prefix
PluginInstance< EmulateInstructionCreateInstance > EmulateInstructionInstance
static ABIInstances & GetABIInstances()
static constexpr llvm::StringLiteral kProcessPluginName("process")
PluginInstances< SymbolVendorInstance > SymbolVendorInstances
static constexpr llvm::StringLiteral kDynamicLoaderPluginName("dynamic-loader")
static lldb::OptionValuePropertiesSP GetSettingForPlugin(Debugger &debugger, llvm::StringRef setting_name, llvm::StringRef plugin_type_name, GetDebuggerPropertyForPluginsPtr get_debugger_property=GetDebuggerPropertyForPlugins)
static ScriptInterpreterInstances & GetScriptInterpreterInstances()
PluginInstance< DynamicLoaderCreateInstance > DynamicLoaderInstance
PluginInstances< PlatformInstance > PlatformInstances
PluginInstance< JITLoaderCreateInstance > JITLoaderInstance
PluginInstance< ArchitectureCreateInstance > ArchitectureInstance
static constexpr llvm::StringLiteral kCPlusPlusLanguagePlugin("cplusplus")
PluginInstances< SystemRuntimeInstance > SystemRuntimeInstances
static TraceExporterInstances & GetTraceExporterInstances()
PluginInstance< LanguageCreateInstance > LanguageInstance
PluginInstance< SymbolFileCreateInstance > SymbolFileInstance
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPlugins(Debugger &debugger, llvm::StringRef plugin_type_name, llvm::StringRef plugin_type_desc, bool can_create)
static constexpr llvm::StringLiteral kSymbolLocatorPluginName("symbol-locator")
PluginInstances< ObjectFileInstance > ObjectFileInstances
void(* PluginTermCallback)()
static StructuredDataPluginInstances & GetStructuredDataPluginInstances()
static constexpr llvm::StringLiteral kObjectFilePluginName("object-file")
PluginInstances< MemoryHistoryInstance > MemoryHistoryInstances
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(Debugger &debugger, llvm::StringRef plugin_type_name, llvm::StringRef plugin_type_desc, bool can_create)
PluginInstances< DynamicLoaderInstance > DynamicLoaderInstances
PluginInstances< LanguageInstance > LanguageInstances
PluginInstances< TraceInstance > TraceInstances
PluginInstances< ArchitectureInstance > ArchitectureInstances
PluginInstances< StructuredDataPluginInstance > StructuredDataPluginInstances
static constexpr llvm::StringLiteral kStructuredDataPluginName("structured-data")
PluginInstance< MemoryHistoryCreateInstance > MemoryHistoryInstance
static const char * kOperatingSystemPluginName("os")
static SymbolLocatorInstances & GetSymbolLocatorInstances()
PluginInstance< ProtocolServerCreateInstance > ProtocolServerInstance
PluginInstance< OperatingSystemCreateInstance > OperatingSystemInstance
static ObjectFileInstances & GetObjectFileInstances()
static constexpr llvm::StringLiteral kSymbolFilePluginName("symbol-file")
PluginInstances< SymbolLocatorInstance > SymbolLocatorInstances
PluginInstance< SystemRuntimeCreateInstance > SystemRuntimeInstance
PluginInstance< SymbolVendorCreateInstance > SymbolVendorInstance
static EmulateInstructionInstances & GetEmulateInstructionInstances()
PluginInstance< UnwindAssemblyCreateInstance > UnwindAssemblyInstance
static LanguageInstances & GetLanguageInstances()
static constexpr llvm::StringLiteral kJITLoaderPluginName("jit-loader")
static ScriptedFrameProviderInstances & GetScriptedFrameProviderInstances()
PluginInstances< OperatingSystemInstance > OperatingSystemInstances
static LanguageRuntimeInstances & GetLanguageRuntimeInstances()
PluginInstances< LanguageRuntimeInstance > LanguageRuntimeInstances
static InstrumentationRuntimeInstances & GetInstrumentationRuntimeInstances()
PluginInstances< ProcessInstance > ProcessInstances
PluginInstances< SyntheticFrameProviderInstance > SyntheticFrameProviderInstances
PluginInstances< REPLInstance > REPLInstances
static ArchitectureInstances & GetArchitectureInstances()
static DynamicPluginMap & GetPluginMap()
PluginInstances< ScriptedFrameProviderInstance > ScriptedFrameProviderInstances
static RegisterTypeBuilderInstances & GetRegisterTypeBuilderInstances()
static std::recursive_mutex & GetPluginMapMutex()
llvm::SmallDenseMap< FileSpec, PluginInfo > DynamicPluginMap
static HighlighterInstances & GetHighlighterInstances()
static TypeSystemInstances & GetTypeSystemInstances()
static PlatformInstances & GetPlatformInstances()
static ScriptedInterfaceInstances & GetScriptedInterfaceInstances()
static FileSystem::EnumerateDirectoryResult LoadPluginCallback(void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
PluginInstances< EmulateInstructionInstance > EmulateInstructionInstances
PluginInstance< SyntheticFrameProviderCreateInstance > SyntheticFrameProviderInstance
static JITLoaderInstances & GetJITLoaderInstances()
PluginInstances< DisassemblerInstance > DisassemblerInstances
PluginInstance< ProcessCreateInstance > ProcessInstance
static UnwindAssemblyInstances & GetUnwindAssemblyInstances()
static void SetPluginInfo(const FileSpec &plugin_file_spec, PluginInfo plugin_info)
PluginInstances< ScriptedInterfaceInstance > ScriptedInterfaceInstances
PluginInstances< UnwindAssemblyInstance > UnwindAssemblyInstances
static SymbolFileInstances & GetSymbolFileInstances()
static bool CreateSettingForPlugin(Debugger &debugger, llvm::StringRef plugin_type_name, llvm::StringRef plugin_type_desc, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property, GetDebuggerPropertyForPluginsPtr get_debugger_property=GetDebuggerPropertyForPlugins)
PluginInstances< ABIInstance > ABIInstances
static FPtrTy CastToFPtr(void *VPtr)
static ProcessInstances & GetProcessInstances()
static bool PluginIsLoaded(const FileSpec &plugin_file_spec)
static OperatingSystemInstances & GetOperatingSystemInstances()
static constexpr llvm::StringLiteral kTracePluginName("trace")
PluginInstance< ScriptedFrameProviderCreateInstance > ScriptedFrameProviderInstance
PluginInstances< ScriptInterpreterInstance > ScriptInterpreterInstances
static SyntheticFrameProviderInstances & GetSyntheticFrameProviderInstances()
bool(* PluginInitCallback)()
PluginInstance< DisassemblerCreateInstance > DisassemblerInstance
static SymbolVendorInstances & GetSymbolVendorInstances()
PluginInstances< ObjectContainerInstance > ObjectContainerInstances
static ProtocolServerInstances & GetProtocolServerInstances()
PluginInstances< RegisterTypeBuilderInstance > RegisterTypeBuilderInstances
static REPLInstances & GetREPLInstances()
static double elapsed(const StatsTimepoint &start, const StatsTimepoint &end)
bool UnregisterPlugin(typename Instance::CallbackType callback)
std::optional< ABIInstance > FindInstance(std::function< bool(const ABIInstance &)> predicate) const
llvm::StringRef GetNameAtIndex(uint32_t idx)
llvm::SmallVector< ABIInstance > m_instances
llvm::StringRef GetDescriptionAtIndex(uint32_t idx)
llvm::SmallVector< typename Instance::CallbackType > GetCreateCallbacks()
std::optional< ABIInstance > GetInstanceAtIndex(uint32_t idx)
llvm::SmallVector< RegisteredPluginInfo > GetPluginInfoForAllInstances()
Instance::CallbackType GetCallbackForName(llvm::StringRef name)
llvm::SmallVector< ABIInstance > GetSnapshot(bool enabled_only=true) const
bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, typename Instance::CallbackType callback, Args &&...args)
void PerformDebuggerCallback(Debugger &debugger)
std::optional< ABIInstance > FindEnabledInstance(std::function< bool(const ABIInstance &)> predicate) const
std::optional< ABIInstance > GetInstanceForName(llvm::StringRef name, bool enabled_only=true)
bool SetInstanceEnabled(llvm::StringRef name, bool enable)
An architecture specification class.
A command line argument class.
"lldb/Utility/ArgCompletionRequest.h"
void AddCompletion(llvm::StringRef completion, llvm::StringRef description="", CompletionMode mode=CompletionMode::Normal)
Adds a possible completion string.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A class to manage flag bits.
A class that measures elapsed time in an exception safe way.
const ConstString & GetFilename() const
Filename string const get accessor.
ConstString GetFileNameStrippingExtension() const
Return the filename without the extension part.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
llvm::StringRef GetFileNameExtension() const
Extract the extension of the file.
void EnumerateDirectory(llvm::Twine path, bool find_directories, bool find_files, bool find_other, EnumerateDirectoryCallbackType callback, void *callback_baton)
@ eEnumerateDirectoryResultEnter
Recurse into the current entry if it is a directory or symlink, or next if not.
@ eEnumerateDirectoryResultNext
Enumerate next entry in the current directory.
bool Exists(const FileSpec &file_spec) const
Returns whether the given file exists.
static FileSystem & Instance()
void Resolve(llvm::SmallVectorImpl< char > &path, bool force_make_absolute=false)
Resolve path to make it canonical.
static bool SetArchitecturePluginEnabled(llvm::StringRef name, bool enable)
static llvm::StringRef GetPlatformPluginDescriptionAtIndex(uint32_t idx)
static bool SetPlatformPluginEnabled(llvm::StringRef name, bool enable)
static bool SetScriptInterpreterPluginEnabled(llvm::StringRef name, bool enable)
static bool MatchPluginName(llvm::StringRef pattern, const PluginNamespace &plugin_ns, const RegisteredPluginInfo &plugin)
static lldb::OptionValuePropertiesSP GetSettingForStructuredDataPlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool SetMemoryHistoryPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetSystemRuntimePluginInfo()
static llvm::SmallVector< RegisteredPluginInfo > GetTypeSystemPluginInfo()
static bool CreateSettingForJITLoaderPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool SetRegisterTypeBuilderPluginEnabled(llvm::StringRef name, bool enable)
static llvm::StringRef PluginDomainKindToStr(lldb::PluginDomainKind kind)
static bool SetTraceExporterPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetArchitecturePluginInfo()
static LanguageSet GetAllTypeSystemSupportedLanguagesForExpressions()
static bool CreateSettingForOperatingSystemPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static llvm::SmallVector< UnwindAssemblyCreateInstance > GetUnwindAssemblyCreateCallbacks()
static lldb::OptionValuePropertiesSP GetSettingForObjectFilePlugin(Debugger &debugger, llvm::StringRef setting_name)
static llvm::SmallVector< RegisteredPluginInfo > GetEmulateInstructionPluginInfo()
static void AutoCompletePlatformName(llvm::StringRef partial_name, CompletionRequest &request)
static TraceExporterCreateInstance GetTraceExporterCreateCallback(llvm::StringRef plugin_name)
static bool SetDynamicLoaderPluginEnabled(llvm::StringRef name, bool enable)
static llvm::json::Object GetJSON(llvm::StringRef pattern="")
static bool CreateSettingForObjectFilePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool SetScriptedInterfacePluginEnabled(llvm::StringRef name, bool enable)
static bool SetOperatingSystemPluginEnabled(llvm::StringRef name, bool enable)
static lldb::ScriptInterpreterSP GetScriptInterpreterForLanguage(lldb::ScriptLanguage script_lang, Debugger &debugger)
static llvm::SmallVector< ABICreateInstance > GetABICreateCallbacks()
static llvm::SmallVector< InstrumentationRuntimeCallbacks > GetInstrumentationRuntimeCallbacks(bool enabled_only=true)
static void AutoCompleteProcessName(llvm::StringRef partial_name, CompletionRequest &request)
static llvm::SmallVector< RegisteredPluginInfo > GetScriptInterpreterPluginInfo()
static llvm::SmallVector< RegisteredPluginInfo > GetABIPluginInfo()
static llvm::SmallVector< RegisteredPluginInfo > GetLanguagePluginInfo()
static LanguageSet GetREPLAllTypeSystemSupportedLanguages()
static llvm::SmallVector< OperatingSystemCreateInstance > GetOperatingSystemCreateCallbacks()
static bool CreateSettingForTracePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static llvm::SmallVector< RegisteredPluginInfo > GetDynamicLoaderPluginInfo()
static lldb::OptionValuePropertiesSP GetSettingForOperatingSystemPlugin(Debugger &debugger, llvm::StringRef setting_name)
static llvm::Error SetInstrumentationRuntimePluginEnabled(llvm::StringRef name, bool enable, Debugger &requesting_debugger, lldb::PluginDomainKind domain)
static llvm::SmallVector< ProcessCreateInstance > GetProcessCreateCallbacks()
static llvm::SmallVector< RegisteredPluginInfo > GetObjectContainerPluginInfo()
static bool DownloadObjectAndSymbolFile(ModuleSpec &module_spec, Status &error, bool force_lookup=true, bool copy_executable=true)
static llvm::SmallVector< RegisteredPluginInfo > GetDisassemblerPluginInfo()
static llvm::SmallVector< LanguageRuntimeCallbacks > GetLanguageRuntimeCallbacks()
static llvm::SmallVector< SymbolFileCreateInstance > GetSymbolFileCreateCallbacks()
static bool SetLanguageRuntimePluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetObjectFilePluginInfo()
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static lldb::ScriptLanguage GetScriptedInterfaceLanguageAtIndex(uint32_t idx)
static llvm::SmallVector< RegisteredPluginInfo > GetSymbolLocatorPluginInfo()
static llvm::StringRef GetTraceSchema(llvm::StringRef plugin_name)
Get the JSON schema for a trace bundle description file corresponding to the given plugin.
static llvm::SmallVector< SymbolVendorCreateInstance > GetSymbolVendorCreateCallbacks()
static bool SetUnwindAssemblyPluginEnabled(llvm::StringRef name, bool enable)
static lldb::OptionValuePropertiesSP GetSettingForCPlusPlusLanguagePlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool SetDisassemblerPluginEnabled(llvm::StringRef name, bool enable)
static bool SetSystemRuntimePluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetTracePluginInfo()
static llvm::SmallVector< JITLoaderCreateInstance > GetJITLoaderCreateCallbacks()
static llvm::SmallVector< RegisteredPluginInfo > GetProcessPluginInfo()
static TraceCreateInstanceForLiveProcess GetTraceCreateCallbackForLiveProcess(llvm::StringRef plugin_name)
static std::unique_ptr< Architecture > CreateArchitectureInstance(const ArchSpec &arch)
static llvm::SmallVector< DisassemblerCreateInstance > GetDisassemblerCreateCallbacks()
static lldb::OptionValuePropertiesSP GetSettingForSymbolLocatorPlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool SetStructuredDataPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< ObjectFileCallbacks > GetObjectFileCallbacks()
static uint32_t GetNumScriptedInterfaces()
static llvm::SmallVector< RegisteredPluginInfo > GetLanguageRuntimePluginInfo()
static bool SetObjectContainerPluginEnabled(llvm::StringRef name, bool enable)
static bool CreateSettingForProcessPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static llvm::SmallVector< RegisteredPluginInfo > GetPlatformPluginInfo()
static llvm::SmallVector< RegisteredPluginInfo > GetMemoryHistoryPluginInfo()
static llvm::SmallVector< TypeSystemCreateInstance > GetTypeSystemCreateCallbacks()
static lldb::OptionValuePropertiesSP GetSettingForPlatformPlugin(Debugger &debugger, llvm::StringRef setting_name)
static llvm::SmallVector< RegisteredPluginInfo > GetSymbolFilePluginInfo()
static SyntheticFrameProviderCreateInstance GetSyntheticFrameProviderCreateCallbackForPluginName(llvm::StringRef name)
static llvm::SmallVector< SymbolLocatorCreateInstance > GetSymbolLocatorCreateCallbacks()
static llvm::ArrayRef< PluginNamespace > GetPluginNamespaces()
static bool SetTypeSystemPluginEnabled(llvm::StringRef name, bool enable)
static bool SetTracePluginEnabled(llvm::StringRef name, bool enable)
static Status SaveCore(lldb_private::SaveCoreOptions &core_options)
static llvm::SmallVector< RegisteredPluginInfo > GetTraceExporterPluginInfo()
static FileSpec LocateExecutableSymbolFile(const ModuleSpec &module_spec, const FileSpecList &default_search_paths, StatisticsMap &map)
static bool SetEmulateInstructionPluginEnabled(llvm::StringRef name, bool enable)
static lldb::OptionValuePropertiesSP GetSettingForJITLoaderPlugin(Debugger &debugger, llvm::StringRef setting_name)
static DisassemblerCreateInstance GetDisassemblerCreateCallbackForPluginName(llvm::StringRef name)
static bool SetJITLoaderPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetInstrumentationRuntimePluginInfo()
static llvm::SmallVector< REPLCallbacks > GetREPLCallbacks()
static bool CreateSettingForSymbolFilePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool CreateSettingForPlatformPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static OperatingSystemCreateInstance GetOperatingSystemCreateCallbackForPluginName(llvm::StringRef name)
static bool SetSymbolFilePluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< ScriptInterpreterCreateInstance > GetScriptInterpreterCreateCallbacks()
static llvm::SmallVector< RegisteredPluginInfo > GetRegisterTypeBuilderPluginInfo()
static EmulateInstructionCreateInstance GetEmulateInstructionCreateCallbackForPluginName(llvm::StringRef name)
static lldb::OptionValuePropertiesSP GetSettingForSymbolFilePlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool CreateSettingForStructuredDataPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool CreateSettingForCPlusPlusLanguagePlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static llvm::SmallVector< TraceExporterCallbacks > GetTraceExporterCallbacks()
static llvm::SmallVector< RegisteredPluginInfo > GetSymbolVendorPluginInfo()
static DynamicLoaderCreateInstance GetDynamicLoaderCreateCallbackForPluginName(llvm::StringRef name)
static llvm::SmallVector< EmulateInstructionCreateInstance > GetEmulateInstructionCreateCallbacks()
static PlatformCreateInstance GetPlatformCreateCallbackForPluginName(llvm::StringRef name)
static bool SetProcessPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< llvm::StringRef > GetSaveCorePluginNames()
static llvm::SmallVector< RegisteredPluginInfo > GetOperatingSystemPluginInfo()
static llvm::SmallVector< ScriptedFrameProviderCreateInstance > GetScriptedFrameProviderCreateCallbacks()
static bool SetABIPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetScriptedInterfacePluginInfo()
static lldb::OptionValuePropertiesSP GetSettingForProcessPlugin(Debugger &debugger, llvm::StringRef setting_name)
static ProcessCreateInstance GetProcessCreateCallbackForPluginName(llvm::StringRef name)
static void AutoCompletePluginName(llvm::StringRef partial_name, CompletionRequest &request)
static llvm::StringRef GetScriptedInterfaceDescriptionAtIndex(uint32_t idx)
static llvm::StringRef GetProcessPluginDescriptionAtIndex(uint32_t idx)
static llvm::StringRef GetProtocolServerPluginNameAtIndex(uint32_t idx)
static bool IsRegisteredObjectFilePluginName(llvm::StringRef name)
static lldb::OptionValuePropertiesSP GetSettingForDynamicLoaderPlugin(Debugger &debugger, llvm::StringRef setting_name)
static bool CreateSettingForDynamicLoaderPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static bool SetLanguagePluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetREPLPluginInfo()
static bool SetREPLPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< HighlighterCreateInstance > GetHighlighterCreateCallbacks()
static llvm::SmallVector< RegisteredPluginInfo > GetUnwindAssemblyPluginInfo()
static llvm::StringRef GetPlatformPluginNameAtIndex(uint32_t idx)
static bool SetSymbolVendorPluginEnabled(llvm::StringRef name, bool enable)
static TraceCreateInstanceFromBundle GetTraceCreateCallback(llvm::StringRef plugin_name)
static void DebuggerInitialize(Debugger &debugger)
static llvm::StringRef GetScriptedInterfaceNameAtIndex(uint32_t idx)
static llvm::SmallVector< ObjectContainerCallbacks > GetObjectContainerCallbacks()
static llvm::StringRef GetProcessPluginNameAtIndex(uint32_t idx)
static ModuleSpec LocateExecutableObjectFile(const ModuleSpec &module_spec, StatisticsMap &map)
static llvm::SmallVector< StructuredDataPluginCallbacks > GetStructuredDataPluginCallbacks()
static LanguageSet GetAllTypeSystemSupportedLanguagesForTypes()
static llvm::SmallVector< SystemRuntimeCreateInstance > GetSystemRuntimeCreateCallbacks()
static FileSpec GetScriptInterpreterLibraryPath(lldb::ScriptLanguage script_lang)
static bool UnregisterPlugin(ABICreateInstance create_callback)
static FileSpec FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch)
static llvm::SmallVector< RegisteredPluginInfo > GetStructuredDataPluginInfo()
static bool SetSymbolLocatorPluginEnabled(llvm::StringRef name, bool enable)
static ProtocolServerCreateInstance GetProtocolCreateCallbackForPluginName(llvm::StringRef name)
static llvm::SmallVector< LanguageCreateInstance > GetLanguageCreateCallbacks()
static llvm::SmallVector< DynamicLoaderCreateInstance > GetDynamicLoaderCreateCallbacks()
static lldb::RegisterTypeBuilderSP GetRegisterTypeBuilder(Target &target)
static llvm::SmallVector< MemoryHistoryCreateInstance > GetMemoryHistoryCreateCallbacks()
static ScriptedInterfaceUsages GetScriptedInterfaceUsagesAtIndex(uint32_t idx)
static ObjectFileCreateMemoryInstance GetObjectFileCreateMemoryCallbackForPluginName(llvm::StringRef name)
static bool CreateSettingForSymbolLocatorPlugin(Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp, llvm::StringRef description, bool is_global_property)
static llvm::SmallVector< RegisteredPluginInfo > GetJITLoaderPluginInfo()
static bool SetObjectFilePluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< PlatformCreateInstance > GetPlatformCreateCallbacks()
lldb::OptionValuePropertiesSP GetValueProperties() const
const std::optional< lldb_private::FileSpec > GetOutputFile() const
Status EnsureValidConfiguration() const
std::optional< std::string > GetPluginName() const
lldb::ProcessSP GetProcess() const
A class to count time for plugins.
void add(llvm::StringRef key, double value)
static Status FromErrorString(const char *str)
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
Represents UUID's of various sizes.
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.
SymbolVendor *(* SymbolVendorCreateInstance)(const lldb::ModuleSP &module_sp, lldb_private::Stream *feedback_strm)
bool(* ObjectFileSaveCore)(const lldb::ProcessSP &process_sp, lldb_private::SaveCoreOptions &options, Status &error)
llvm::Expected< lldb::TraceSP >(* TraceCreateInstanceForLiveProcess)(Process &process)
FileSpec(* ScriptInterpreterGetPath)()
lldb::RegisterTypeBuilderSP(* RegisterTypeBuilderCreateInstance)(Target &target)
lldb::ProtocolServerUP(* ProtocolServerCreateInstance)()
LanguageRuntime *(* LanguageRuntimeCreateInstance)(Process *process, lldb::LanguageType language)
lldb::InstrumentationRuntimeType(* InstrumentationRuntimeGetType)()
llvm::Expected< lldb::TraceSP >(* TraceCreateInstanceFromBundle)(const llvm::json::Value &trace_bundle_description, llvm::StringRef session_file_dir, lldb_private::Debugger &debugger)
Trace.
lldb::DisassemblerSP(* DisassemblerCreateInstance)(const ArchSpec &arch, const char *flavor, const char *cpu, const char *features)
std::optional< FileSpec >(* SymbolLocatorLocateExecutableSymbolFile)(const ModuleSpec &module_spec, const FileSpecList &default_search_paths)
EmulateInstruction *(* EmulateInstructionCreateInstance)(const ArchSpec &arch, InstructionType inst_type)
ObjectContainer *(* ObjectContainerCreateMemoryInstance)(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t offset)
void(* DebuggerInitializeCallback)(Debugger &debugger)
std::unique_ptr< Architecture >(* ArchitectureCreateInstance)(const ArchSpec &arch)
lldb::ScriptInterpreterSP(* ScriptInterpreterCreateInstance)(Debugger &debugger)
lldb::PlatformSP(* PlatformCreateInstance)(bool force, const ArchSpec *arch)
bool(* ScriptedInterfaceCreateInstance)(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
SystemRuntime *(* SystemRuntimeCreateInstance)(Process *process)
lldb::ProcessSP(* ProcessCreateInstance)(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
UnwindAssembly *(* UnwindAssemblyCreateInstance)(const ArchSpec &arch)
lldb::TypeSystemSP(* TypeSystemCreateInstance)(lldb::LanguageType language, Module *module, Target *target)
lldb::BreakpointPreconditionSP(* LanguageRuntimeGetExceptionPrecondition)(lldb::LanguageType language, bool throw_bp)
ObjectContainer *(* ObjectContainerCreateInstance)(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t offset, lldb::offset_t length)
lldb::MemoryHistorySP(* MemoryHistoryCreateInstance)(const lldb::ProcessSP &process_sp)
ObjectFile *(* ObjectFileCreateMemoryInstance)(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t offset)
SymbolLocator *(* SymbolLocatorCreateInstance)()
std::optional< ModuleSpec >(* SymbolLocatorLocateExecutableObjectFile)(const ModuleSpec &module_spec)
@ Partial
The current token has been partially completed.
lldb::CommandObjectSP(* LanguageRuntimeGetCommandObject)(CommandInterpreter &interpreter)
DynamicLoader *(* DynamicLoaderCreateInstance)(Process *process, bool force)
lldb::StructuredDataPluginSP(* StructuredDataPluginCreateInstance)(Process &process)
lldb::JITLoaderSP(* JITLoaderCreateInstance)(Process *process, bool force)
llvm::Expected< lldb::SyntheticFrameProviderSP >(* SyntheticFrameProviderCreateInstance)(lldb::StackFrameListSP input_frames, const std::vector< lldb_private::ThreadSpec > &thread_specs)
OperatingSystem *(* OperatingSystemCreateInstance)(Process *process, bool force)
lldb::REPLSP(* REPLCreateInstance)(Status &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
SymbolFile *(* SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp)
llvm::Expected< lldb::TraceExporterUP >(* TraceExporterCreateInstance)()
Highlighter *(* HighlighterCreateInstance)(lldb::LanguageType language)
std::optional< FileSpec >(* SymbolLocatorFindSymbolFileInBundle)(const FileSpec &dsym_bundle_fspec, const UUID *uuid, const ArchSpec *arch)
bool(* SymbolLocatorDownloadObjectAndSymbolFile)(ModuleSpec &module_spec, Status &error, bool force_lookup, bool copy_executable)
Language *(* LanguageCreateInstance)(lldb::LanguageType language)
Status(* StructuredDataFilterLaunchInfo)(ProcessLaunchInfo &launch_info, Target *target)
ObjectFile *(* ObjectFileCreateInstance)(const lldb::ModuleSP &module_sp, lldb::DataExtractorSP extractor_sp, lldb::offset_t data_offset, const FileSpec *file, lldb::offset_t file_offset, lldb::offset_t length)
ModuleSpecList(* ObjectFileGetModuleSpecifications)(const FileSpec &file, lldb::DataExtractorSP &extractor_sp, lldb::offset_t file_offset, lldb::offset_t length)
lldb::ABISP(* ABICreateInstance)(lldb::ProcessSP process_sp, const ArchSpec &arch)
llvm::Expected< lldb::SyntheticFrameProviderSP >(* ScriptedFrameProviderCreateInstance)(lldb::StackFrameListSP input_frames, const lldb_private::ScriptedFrameProviderDescriptor &descriptor)
lldb::CommandObjectSP(* ThreadTraceExportCommandCreator)(CommandInterpreter &interpreter)
lldb::InstrumentationRuntimeSP(* InstrumentationRuntimeCreateInstance)(const lldb::ProcessSP &process_sp)
ScriptLanguage
Script interpreter types.
std::shared_ptr< lldb_private::OptionValueProperties > OptionValuePropertiesSP
std::shared_ptr< lldb_private::ScriptInterpreter > ScriptInterpreterSP
@ ePluginDomainKindTarget
@ ePluginDomainKindGlobal
@ ePluginDomainKindDebugger
std::shared_ptr< lldb_private::RegisterTypeBuilder > RegisterTypeBuilderSP
HighlighterInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback)
InstrumentationRuntimeGetType get_type_callback
InstrumentationRuntimeInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, InstrumentationRuntimeGetType get_type_callback)
InstrumentationRuntimeGetType GetTypeCallbackForName(llvm::StringRef name, bool enabled_only)
LanguageRuntimeGetExceptionPrecondition precondition_callback
LanguageRuntimeInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, DebuggerInitializeCallback debugger_init_callback, LanguageRuntimeGetCommandObject command_callback, LanguageRuntimeGetExceptionPrecondition precondition_callback)
LanguageRuntimeGetCommandObject command_callback
ObjectFileGetModuleSpecifications get_module_specifications
ObjectContainerInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, ObjectContainerCreateMemoryInstance create_memory_callback, ObjectFileGetModuleSpecifications get_module_specifications)
ObjectContainerCreateMemoryInstance create_memory_callback
ObjectFileCreateMemoryInstance create_memory_callback
ObjectFileGetModuleSpecifications get_module_specifications
ObjectFileInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, ObjectFileCreateMemoryInstance create_memory_callback, ObjectFileGetModuleSpecifications get_module_specifications, ObjectFileSaveCore save_core, DebuggerInitializeCallback debugger_init_callback)
ObjectFileSaveCore save_core
PluginDir(FileSpec path, LoadPolicy policy)
const LoadPolicy policy
Filter when looking for plugins.
const FileSpec path
The path to the plugin directory.
@ LoadOnlyWithLLDBPrefix
Only load shared libraries who's filename start with g_plugin_prefix.
@ LoadAnyDylib
Try to load anything that looks like a shared library.
PluginTermCallback plugin_term_callback
llvm::sys::DynamicLibrary library
PluginInfo & operator=(PluginInfo &&other)
PluginInitCallback plugin_init_callback
PluginInfo(const PluginInfo &)=delete
PluginInfo(PluginInfo &&other)
static llvm::Expected< PluginInfo > Create(const FileSpec &path)
PluginInfo & operator=(const PluginInfo &)=delete
llvm::StringRef description
DebuggerInitializeCallback debugger_init_callback
ABICreateInstance create_callback
PluginInstance(llvm::StringRef name, llvm::StringRef description, Callback create_callback, DebuggerInitializeCallback debugger_init_callback=nullptr)
LanguageSet supported_languages
REPLInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, LanguageSet supported_languages)
RegisterTypeBuilderInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback)
ScriptInterpreterInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, lldb::ScriptLanguage language, ScriptInterpreterGetPath get_path_callback)
lldb::ScriptLanguage language
ScriptInterpreterGetPath get_path_callback
ScriptedInterfaceUsages usages
lldb::ScriptLanguage language
ScriptedInterfaceInstance(llvm::StringRef name, llvm::StringRef description, ScriptedInterfaceCreateInstance create_callback, lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
StructuredDataPluginInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, DebuggerInitializeCallback debugger_init_callback, StructuredDataFilterLaunchInfo filter_callback)
StructuredDataFilterLaunchInfo filter_callback
SymbolLocatorFindSymbolFileInBundle find_symbol_file_in_bundle
SymbolLocatorInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, SymbolLocatorLocateExecutableObjectFile locate_executable_object_file, SymbolLocatorLocateExecutableSymbolFile locate_executable_symbol_file, SymbolLocatorDownloadObjectAndSymbolFile download_object_symbol_file, SymbolLocatorFindSymbolFileInBundle find_symbol_file_in_bundle, DebuggerInitializeCallback debugger_init_callback)
SymbolLocatorLocateExecutableSymbolFile locate_executable_symbol_file
SymbolLocatorDownloadObjectAndSymbolFile download_object_symbol_file
SymbolLocatorLocateExecutableObjectFile locate_executable_object_file
ThreadTraceExportCommandCreator create_thread_trace_export_command
TraceExporterInstance(llvm::StringRef name, llvm::StringRef description, TraceExporterCreateInstance create_instance, ThreadTraceExportCommandCreator create_thread_trace_export_command)
TraceInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback_from_bundle, TraceCreateInstanceForLiveProcess create_callback_for_live_process, llvm::StringRef schema, DebuggerInitializeCallback debugger_init_callback)
TraceCreateInstanceForLiveProcess create_callback_for_live_process
LanguageSet supported_languages_for_expressions
LanguageSet supported_languages_for_types
TypeSystemInstance(llvm::StringRef name, llvm::StringRef description, CallbackType create_callback, LanguageSet supported_languages_for_types, LanguageSet supported_languages_for_expressions)
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
llvm::SmallBitVector bitvector