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);
575 std::lock_guard<std::mutex> guard(
m_mutex);
577 llvm::SmallVector<Instance> enabled_instances;
580 if (instance.enabled)
581 enabled_instances.push_back(instance);
583 return enabled_instances;
590 [&](
const Instance &instance) {
return count++ == idx; });
598 [&](
const Instance &instance) {
return instance.name == name; });
601 std::optional<Instance>
604 if (predicate(instance))
615 std::lock_guard<std::mutex> guard(
m_mutex);
618 llvm::SmallVector<RegisteredPluginInfo> plugin_infos;
622 plugin_infos.push_back(
623 {instance.name, instance.description, instance.enabled});
629 std::lock_guard<std::mutex> guard(
m_mutex);
630 auto it = llvm::find_if(
m_instances, [&](
const Instance &instance) {
631 return instance.name == name;
637 it->enabled = enable;
657 llvm::StringRef description,
670#pragma mark Architecture
681 llvm::StringRef description,
689 instances.UnregisterPlugin(create_callback);
692std::unique_ptr<Architecture>
695 if (
auto plugin_up = instances.create_callback(arch))
701#pragma mark Disassembler
712 llvm::StringRef description,
723llvm::SmallVector<DisassemblerCreateInstance>
730 llvm::StringRef name) {
734#pragma mark DynamicLoader
745 llvm::StringRef name, llvm::StringRef description,
749 name, description, create_callback, debugger_init_callback);
757llvm::SmallVector<DynamicLoaderCreateInstance>
764 llvm::StringRef name) {
768#pragma mark JITLoader
779 llvm::StringRef name, llvm::StringRef description,
783 name, description, create_callback, debugger_init_callback);
790llvm::SmallVector<JITLoaderCreateInstance>
795#pragma mark EmulateInstruction
807 llvm::StringRef name, llvm::StringRef description,
818llvm::SmallVector<EmulateInstructionCreateInstance>
825 llvm::StringRef name) {
829#pragma mark OperatingSystem
840 llvm::StringRef name, llvm::StringRef description,
844 name, description, create_callback, debugger_init_callback);
852llvm::SmallVector<OperatingSystemCreateInstance>
859 llvm::StringRef name) {
874 llvm::StringRef name, llvm::StringRef description,
878 name, description, create_callback, debugger_init_callback);
885llvm::SmallVector<LanguageCreateInstance>
890#pragma mark LanguageRuntime
917 llvm::StringRef name, llvm::StringRef description,
922 name, description, create_callback,
nullptr, command_callback,
923 precondition_callback);
931llvm::SmallVector<LanguageRuntimeCallbacks>
934 llvm::SmallVector<LanguageRuntimeCallbacks> result;
935 result.reserve(instances.size());
936 for (
auto &instance : instances)
937 result.push_back({instance.create_callback, instance.command_callback,
938 instance.precondition_callback});
942#pragma mark SystemRuntime
953 llvm::StringRef name, llvm::StringRef description,
964llvm::SmallVector<SystemRuntimeCreateInstance>
969#pragma mark ObjectFile
1004 llvm::StringRef name, llvm::StringRef description,
1011 name, description, create_callback, create_memory_callback,
1012 get_module_specifications, save_core, debugger_init_callback);
1021 llvm::SmallVector<ObjectFileCallbacks> result;
1022 result.reserve(instances.size());
1023 for (
auto &instance : instances)
1024 result.push_back({instance.create_callback, instance.create_memory_callback,
1025 instance.get_module_specifications, instance.save_core});
1031 llvm::StringRef name) {
1033 return instance->create_memory_callback;
1055 llvm::Expected<bool> ret =
1064 const auto &plugin_name = options.
GetPluginName().value_or(
"");
1066 for (
auto &instance : instances) {
1067 if (plugin_name.empty() || instance.name == plugin_name) {
1070 if (instance.save_core &&
1082 if (!plugin_name.empty())
1084 "The \"{}\" plugin is not able to save a core for this process.",
1088 "no ObjectFile plugins were able to save a core for this process");
1092 llvm::SmallVector<llvm::StringRef> plugin_names;
1094 for (
auto &instance : instances) {
1095 if (instance.save_core)
1096 plugin_names.emplace_back(instance.name);
1098 return plugin_names;
1101#pragma mark ObjectContainer
1126 llvm::StringRef name, llvm::StringRef description,
1131 name, description, create_callback, create_memory_callback,
1132 get_module_specifications);
1140llvm::SmallVector<ObjectContainerCallbacks>
1143 llvm::SmallVector<ObjectContainerCallbacks> result;
1144 result.reserve(instances.size());
1145 for (
auto &instance : instances)
1146 result.push_back({instance.create_callback, instance.create_memory_callback,
1147 instance.get_module_specifications});
1151#pragma mark Platform
1158 return g_platform_instances;
1162 llvm::StringRef name, llvm::StringRef description,
1166 name, description, create_callback, debugger_init_callback);
1187llvm::SmallVector<PlatformCreateInstance>
1195 if (instance.name.starts_with(name))
1211 llvm::StringRef name, llvm::StringRef description,
1215 name, description, create_callback, debugger_init_callback);
1236llvm::SmallVector<ProcessCreateInstance>
1244 if (instance.name.starts_with(name))
1249#pragma mark ProtocolServer
1260 llvm::StringRef name, llvm::StringRef description,
1281#pragma mark RegisterTypeBuilder
1291typedef PluginInstances<RegisterTypeBuilderInstance>
1300 llvm::StringRef name, llvm::StringRef description,
1317 return instance->create_callback(target);
1320#pragma mark ScriptInterpreter
1344 llvm::StringRef name, llvm::StringRef description,
1349 name, description, create_callback, script_language, get_path_callback);
1357llvm::SmallVector<ScriptInterpreterCreateInstance>
1367 for (
const auto &instance : instances) {
1369 none_instance = instance.create_callback;
1371 if (script_lang == instance.language)
1372 return instance.create_callback(debugger);
1376 assert(none_instance !=
nullptr);
1377 return none_instance(debugger);
1383 for (
const auto &instance : instances) {
1384 if (instance.language == script_lang && instance.get_path_callback)
1385 return instance.get_path_callback();
1390#pragma mark SyntheticFrameProvider
1412 llvm::StringRef name, llvm::StringRef description,
1415 if (create_native_callback)
1417 name, description, create_native_callback);
1418 else if (create_scripted_callback)
1420 name, description, create_scripted_callback);
1436 llvm::StringRef name) {
1440llvm::SmallVector<ScriptedFrameProviderCreateInstance>
1445#pragma mark StructuredDataPlugin
1470 llvm::StringRef name, llvm::StringRef description,
1475 name, description, create_callback, debugger_init_callback,
1484llvm::SmallVector<StructuredDataPluginCallbacks>
1487 llvm::SmallVector<StructuredDataPluginCallbacks> result;
1488 result.reserve(instances.size());
1489 for (
auto &instance : instances)
1490 result.push_back({instance.create_callback, instance.filter_callback});
1494#pragma mark SymbolFile
1505 llvm::StringRef name, llvm::StringRef description,
1509 name, description, create_callback, debugger_init_callback);
1516llvm::SmallVector<SymbolFileCreateInstance>
1521#pragma mark SymbolVendor
1532 llvm::StringRef description,
1543llvm::SmallVector<SymbolVendorCreateInstance>
1548#pragma mark SymbolLocator
1580 llvm::StringRef name, llvm::StringRef description,
1588 name, description, create_callback, locate_executable_object_file,
1589 locate_executable_symbol_file, download_object_symbol_file,
1590 find_symbol_file_in_bundle, debugger_init_callback);
1598llvm::SmallVector<SymbolLocatorCreateInstance>
1607 for (
auto &instance : instances) {
1608 if (instance.locate_executable_object_file) {
1610 std::optional<ModuleSpec> result;
1613 result = instance.locate_executable_object_file(module_spec);
1615 map.
add(instance.name, time.
get().count());
1627 for (
auto &instance : instances) {
1628 if (instance.locate_executable_symbol_file) {
1630 std::optional<FileSpec> result;
1633 result = instance.locate_executable_symbol_file(module_spec,
1634 default_search_paths);
1636 map.
add(instance.name, time.
get().count());
1647 bool copy_executable) {
1649 for (
auto &instance : instances) {
1650 if (instance.download_object_symbol_file) {
1651 if (instance.download_object_symbol_file(module_spec,
error, force_lookup,
1663 for (
auto &instance : instances) {
1664 if (instance.find_symbol_file_in_bundle) {
1665 std::optional<FileSpec> result =
1666 instance.find_symbol_file_in_bundle(symfile_bundle, uuid, arch);
1700 llvm::StringRef name, llvm::StringRef description,
1705 name, description, create_callback_from_bundle,
1706 create_callback_for_live_process, schema, debugger_init_callback);
1712 create_callback_from_bundle);
1722 llvm::StringRef plugin_name) {
1724 return instance->create_callback_for_live_process;
1731 return instance->schema;
1732 return llvm::StringRef();
1737 return instance->schema;
1738 return llvm::StringRef();
1741#pragma mark TraceExporter
1765 llvm::StringRef name, llvm::StringRef description,
1769 name, description, create_callback, create_thread_trace_export_command);
1782llvm::SmallVector<TraceExporterCallbacks>
1785 llvm::SmallVector<TraceExporterCallbacks> result;
1786 result.reserve(instances.size());
1787 for (
auto &instance : instances)
1788 result.push_back({instance.name, instance.create_callback,
1789 instance.create_thread_trace_export_command});
1793#pragma mark UnwindAssembly
1804 llvm::StringRef name, llvm::StringRef description,
1815llvm::SmallVector<UnwindAssemblyCreateInstance>
1820#pragma mark MemoryHistory
1831 llvm::StringRef name, llvm::StringRef description,
1842llvm::SmallVector<MemoryHistoryCreateInstance>
1847#pragma mark InstrumentationRuntime
1871 llvm::StringRef name, llvm::StringRef description,
1875 name, description, create_callback, get_type_callback);
1883llvm::SmallVector<InstrumentationRuntimeCallbacks>
1886 llvm::SmallVector<InstrumentationRuntimeCallbacks> result;
1887 result.reserve(instances.size());
1888 for (
auto &instance : instances)
1889 result.push_back({instance.create_callback, instance.get_type_callback});
1893#pragma mark TypeSystem
1918 llvm::StringRef name, llvm::StringRef description,
1921 LanguageSet supported_languages_for_expressions) {
1923 name, description, create_callback, supported_languages_for_types,
1924 supported_languages_for_expressions);
1931llvm::SmallVector<TypeSystemCreateInstance>
1939 for (
unsigned i = 0; i < instances.size(); ++i)
1940 all.
bitvector |= instances[i].supported_languages_for_types.bitvector;
1947 for (
unsigned i = 0; i < instances.size(); ++i)
1948 all.
bitvector |= instances[i].supported_languages_for_expressions.bitvector;
1952#pragma mark ScriptedInterfaces
1976 llvm::StringRef name, llvm::StringRef description,
1980 name, description, create_callback, language, usages);
2004 return instance->language;
2011 return instance->usages;
2034 llvm::StringRef description,
2038 supported_languages);
2047 llvm::SmallVector<REPLCallbacks> result;
2048 result.reserve(instances.size());
2049 for (
auto &instance : instances)
2050 result.push_back({instance.create_callback, instance.supported_languages});
2057 for (
unsigned i = 0; i < instances.size(); ++i)
2058 all.
bitvector |= instances[i].supported_languages.bitvector;
2062#pragma mark Highlighter
2079 llvm::StringRef description,
2090llvm::SmallVector<HighlighterCreateInstance>
2095#pragma mark PluginManager
2116 Debugger &debugger, llvm::StringRef plugin_type_name,
2117 llvm::StringRef plugin_type_desc,
bool can_create) {
2120 if (parent_properties_sp) {
2121 static constexpr llvm::StringLiteral g_property_name(
"plugin");
2124 parent_properties_sp->GetSubProperty(
nullptr, g_property_name);
2125 if (!plugin_properties_sp && can_create) {
2126 plugin_properties_sp =
2127 std::make_shared<OptionValueProperties>(g_property_name);
2128 plugin_properties_sp->SetExpectedPath(
"plugin");
2129 parent_properties_sp->AppendProperty(g_property_name,
2130 "Settings specify to plugins.",
true,
2131 plugin_properties_sp);
2134 if (plugin_properties_sp) {
2136 plugin_properties_sp->GetSubProperty(
nullptr, plugin_type_name);
2137 if (!plugin_type_properties_sp && can_create) {
2138 plugin_type_properties_sp =
2139 std::make_shared<OptionValueProperties>(plugin_type_name);
2140 plugin_type_properties_sp->SetExpectedPath(
2141 (
"plugin." + plugin_type_name).str());
2142 plugin_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc,
2143 true, plugin_type_properties_sp);
2145 return plugin_type_properties_sp;
2155 Debugger &debugger, llvm::StringRef plugin_type_name,
2156 llvm::StringRef plugin_type_desc,
bool can_create) {
2157 static constexpr llvm::StringLiteral g_property_name(
"plugin");
2160 if (parent_properties_sp) {
2162 parent_properties_sp->GetSubProperty(
nullptr, plugin_type_name);
2163 if (!plugin_properties_sp && can_create) {
2164 plugin_properties_sp =
2165 std::make_shared<OptionValueProperties>(plugin_type_name);
2166 plugin_properties_sp->SetExpectedPath(plugin_type_name.str());
2167 parent_properties_sp->AppendProperty(plugin_type_name, plugin_type_desc,
2168 true, plugin_properties_sp);
2171 if (plugin_properties_sp) {
2173 plugin_properties_sp->GetSubProperty(
nullptr, g_property_name);
2174 if (!plugin_type_properties_sp && can_create) {
2175 plugin_type_properties_sp =
2176 std::make_shared<OptionValueProperties>(g_property_name);
2177 plugin_type_properties_sp->SetExpectedPath(
2178 (plugin_type_name +
".plugin").str());
2179 plugin_properties_sp->AppendProperty(g_property_name,
2180 "Settings specific to plugins",
2181 true, plugin_type_properties_sp);
2183 return plugin_type_properties_sp;
2192GetDebuggerPropertyForPluginsPtr(
Debugger &, llvm::StringRef, llvm::StringRef,
2198 llvm::StringRef plugin_type_name,
2199 GetDebuggerPropertyForPluginsPtr get_debugger_property =
2203 debugger, plugin_type_name,
2206 if (plugin_type_properties_sp)
2208 plugin_type_properties_sp->GetSubProperty(
nullptr, setting_name);
2209 return properties_sp;
2214 llvm::StringRef plugin_type_desc,
2216 llvm::StringRef description,
bool is_global_property,
2217 GetDebuggerPropertyForPluginsPtr get_debugger_property =
2219 if (properties_sp) {
2221 get_debugger_property(debugger, plugin_type_name, plugin_type_desc,
2223 if (plugin_type_properties_sp) {
2224 plugin_type_properties_sp->AppendProperty(properties_sp->GetName(),
2225 description, is_global_property,
2241static constexpr llvm::StringLiteral
2247 llvm::StringRef setting_name) {
2253 llvm::StringRef description,
bool is_global_property) {
2255 "Settings for dynamic loader plug-ins",
2256 properties_sp, description, is_global_property);
2261 llvm::StringRef setting_name) {
2268 llvm::StringRef description,
bool is_global_property) {
2270 "Settings for platform plug-ins", properties_sp,
2271 description, is_global_property,
2277 llvm::StringRef setting_name) {
2283 llvm::StringRef description,
bool is_global_property) {
2285 "Settings for process plug-ins", properties_sp,
2286 description, is_global_property);
2291 llvm::StringRef setting_name) {
2297 llvm::StringRef description,
bool is_global_property) {
2299 "Settings for symbol locator plug-ins",
2300 properties_sp, description, is_global_property);
2305 llvm::StringRef description,
bool is_global_property) {
2307 "Settings for trace plug-ins", properties_sp,
2308 description, is_global_property);
2313 llvm::StringRef setting_name) {
2319 llvm::StringRef description,
bool is_global_property) {
2321 "Settings for object file plug-ins",
2322 properties_sp, description, is_global_property);
2327 llvm::StringRef setting_name) {
2333 llvm::StringRef description,
bool is_global_property) {
2335 "Settings for symbol file plug-ins",
2336 properties_sp, description, is_global_property);
2341 llvm::StringRef setting_name) {
2347 llvm::StringRef description,
bool is_global_property) {
2349 "Settings for JIT loader plug-ins",
2350 properties_sp, description, is_global_property);
2356 Debugger &debugger, llvm::StringRef setting_name) {
2363 if (plugin_type_properties_sp)
2365 plugin_type_properties_sp->GetSubProperty(
nullptr, setting_name);
2366 return properties_sp;
2371 llvm::StringRef description,
bool is_global_property) {
2372 if (properties_sp) {
2375 "Settings for operating system plug-ins",
2377 if (plugin_type_properties_sp) {
2378 plugin_type_properties_sp->AppendProperty(properties_sp->GetName(),
2379 description, is_global_property,
2389 llvm::StringRef setting_name) {
2395 llvm::StringRef description,
bool is_global_property) {
2397 "Settings for structured data plug-ins",
2398 properties_sp, description, is_global_property);
2403 Debugger &debugger, llvm::StringRef setting_name) {
2409 llvm::StringRef description,
bool is_global_property) {
2411 "Settings for CPlusPlus language plug-ins",
2412 properties_sp, description, is_global_property);
2425llvm::SmallVector<RegisteredPluginInfo>
2434llvm::SmallVector<RegisteredPluginInfo>
2443llvm::SmallVector<RegisteredPluginInfo>
2452llvm::SmallVector<RegisteredPluginInfo>
2461llvm::SmallVector<RegisteredPluginInfo>
2470llvm::SmallVector<RegisteredPluginInfo>
2487llvm::SmallVector<RegisteredPluginInfo>
2496llvm::SmallVector<RegisteredPluginInfo>
2505llvm::SmallVector<RegisteredPluginInfo>
2514llvm::SmallVector<RegisteredPluginInfo>
2523llvm::SmallVector<RegisteredPluginInfo>
2554llvm::SmallVector<RegisteredPluginInfo>
2563llvm::SmallVector<RegisteredPluginInfo>
2572llvm::SmallVector<RegisteredPluginInfo>
2581llvm::SmallVector<RegisteredPluginInfo>
2590llvm::SmallVector<RegisteredPluginInfo>
2599llvm::SmallVector<RegisteredPluginInfo>
2608llvm::SmallVector<RegisteredPluginInfo>
2617llvm::SmallVector<RegisteredPluginInfo>
2633llvm::SmallVector<RegisteredPluginInfo>
2642llvm::SmallVector<RegisteredPluginInfo>
2651llvm::SmallVector<RegisteredPluginInfo>
2665 llvm::StringRef ns_name, plugin_prefix;
2666 std::tie(ns_name, plugin_prefix) = name.split(
'.');
2674 if (plugin_ns.name == ns_name) {
2676 llvm::SmallString<128> buf;
2677 if (
plugin.name.starts_with(plugin_prefix))
2679 (plugin_ns.name +
"." +
plugin.name).toStringRef(buf));
2681 }
else if (plugin_ns.name.starts_with(name) &&
2682 !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< InstrumentationRuntimeInstance > InstrumentationRuntimeInstances
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)
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 > GetInstanceForName(llvm::StringRef name)
std::optional< ABIInstance > GetInstanceAtIndex(uint32_t idx)
llvm::SmallVector< RegisteredPluginInfo > GetPluginInfoForAllInstances()
Instance::CallbackType GetCallbackForName(llvm::StringRef name)
bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, typename Instance::CallbackType callback, Args &&...args)
llvm::SmallVector< ABIInstance > GetSnapshot() const
void PerformDebuggerCallback(Debugger &debugger)
std::optional< ABIInstance > FindEnabledInstance(std::function< bool(const ABIInstance &)> predicate) const
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 bool SetTraceExporterPluginEnabled(llvm::StringRef name, bool enable)
static llvm::SmallVector< RegisteredPluginInfo > GetArchitecturePluginInfo()
static LanguageSet GetAllTypeSystemSupportedLanguagesForExpressions()
static bool SetInstrumentationRuntimePluginEnabled(llvm::StringRef name, bool enable)
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 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::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 llvm::SmallVector< InstrumentationRuntimeCallbacks > GetInstrumentationRuntimeCallbacks()
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)
size_t(* ObjectFileGetModuleSpecifications)(const FileSpec &file, lldb::DataExtractorSP &extractor_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, ModuleSpecList &module_specs)
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)
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
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)
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