static bool CreateSettingForDynamicLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForPlatformPlugin(Debugger &debugger, ConstString setting_name);
static bool CreateSettingForPlatformPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForProcessPlugin(Debugger &debugger, ConstString setting_name);
static bool CreateSettingForProcessPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static bool CreateSettingForTracePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForObjectFilePlugin(Debugger &debugger, ConstString setting_name);
static bool CreateSettingForObjectFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForSymbolFilePlugin(Debugger &debugger, ConstString setting_name);
static bool CreateSettingForSymbolFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForJITLoaderPlugin(Debugger &debugger, ConstString setting_name);
static bool CreateSettingForJITLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForOperatingSystemPlugin(Debugger &debugger,
static bool CreateSettingForOperatingSystemPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
static lldb::OptionValuePropertiesSP
GetSettingForStructuredDataPlugin(Debugger &debugger,
static bool CreateSettingForStructuredDataPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property);
+ llvm::StringRef description, bool is_global_property);
};
} // namespace lldb_private
OptionValueFileSpecList *GetPropertyAtIndexAsOptionValueFileSpecList(
const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const;
- void AppendProperty(ConstString name, ConstString desc,
- bool is_global, const lldb::OptionValueSP &value_sp);
+ void AppendProperty(ConstString name, llvm::StringRef desc, bool is_global,
+ const lldb::OptionValueSP &value_sp);
lldb::OptionValuePropertiesSP GetSubProperty(const ExecutionContext *exe_ctx,
ConstString name);
m_collection_sp->Initialize(g_debugger_properties);
m_collection_sp->AppendProperty(
- ConstString("target"),
- ConstString("Settings specify to debugging targets."), true,
+ ConstString("target"), "Settings specify to debugging targets.", true,
Target::GetGlobalProperties().GetValueProperties());
m_collection_sp->AppendProperty(
- ConstString("platform"), ConstString("Platform settings."), true,
+ ConstString("platform"), "Platform settings.", true,
Platform::GetGlobalPlatformProperties().GetValueProperties());
m_collection_sp->AppendProperty(
- ConstString("symbols"), ConstString("Symbol lookup and cache settings."),
- true, ModuleList::GetGlobalModuleListProperties().GetValueProperties());
+ ConstString("symbols"), "Symbol lookup and cache settings.", true,
+ ModuleList::GetGlobalModuleListProperties().GetValueProperties());
if (m_command_interpreter_up) {
m_collection_sp->AppendProperty(
ConstString("interpreter"),
- ConstString("Settings specify to the debugger's command interpreter."),
- true, m_command_interpreter_up->GetValueProperties());
+ "Settings specify to the debugger's command interpreter.", true,
+ m_command_interpreter_up->GetValueProperties());
}
OptionValueSInt64 *term_width =
m_collection_sp->GetPropertyAtIndexAsOptionValueSInt64(
// "plugin.<plugin_type_name>.<plugin_type_desc>.SETTINGNAME".
static lldb::OptionValuePropertiesSP
GetDebuggerPropertyForPlugins(Debugger &debugger, ConstString plugin_type_name,
- ConstString plugin_type_desc, bool can_create) {
+ llvm::StringRef plugin_type_desc,
+ bool can_create) {
lldb::OptionValuePropertiesSP parent_properties_sp(
debugger.GetValueProperties());
if (parent_properties_sp) {
if (!plugin_properties_sp && can_create) {
plugin_properties_sp =
std::make_shared<OptionValueProperties>(g_property_name);
- parent_properties_sp->AppendProperty(
- g_property_name, ConstString("Settings specify to plugins."), true,
- plugin_properties_sp);
+ parent_properties_sp->AppendProperty(g_property_name,
+ "Settings specify to plugins.", true,
+ plugin_properties_sp);
}
if (plugin_properties_sp) {
// generic settings would be under "platform.SETTINGNAME".
static lldb::OptionValuePropertiesSP GetDebuggerPropertyForPluginsOldStyle(
Debugger &debugger, ConstString plugin_type_name,
- ConstString plugin_type_desc, bool can_create) {
+ llvm::StringRef plugin_type_desc, bool can_create) {
static ConstString g_property_name("plugin");
lldb::OptionValuePropertiesSP parent_properties_sp(
debugger.GetValueProperties());
if (!plugin_type_properties_sp && can_create) {
plugin_type_properties_sp =
std::make_shared<OptionValueProperties>(g_property_name);
- plugin_properties_sp->AppendProperty(
- g_property_name, ConstString("Settings specific to plugins"), true,
- plugin_type_properties_sp);
+ plugin_properties_sp->AppendProperty(g_property_name,
+ "Settings specific to plugins",
+ true, plugin_type_properties_sp);
}
return plugin_type_properties_sp;
}
namespace {
typedef lldb::OptionValuePropertiesSP
-GetDebuggerPropertyForPluginsPtr(Debugger &, ConstString, ConstString,
+GetDebuggerPropertyForPluginsPtr(Debugger &, ConstString, llvm::StringRef,
bool can_create);
}
lldb::OptionValuePropertiesSP properties_sp;
lldb::OptionValuePropertiesSP plugin_type_properties_sp(get_debugger_property(
debugger, plugin_type_name,
- ConstString(), // not creating to so we don't need the description
+ "", // not creating to so we don't need the description
false));
if (plugin_type_properties_sp)
properties_sp =
static bool
CreateSettingForPlugin(Debugger &debugger, ConstString plugin_type_name,
- ConstString plugin_type_desc,
+ llvm::StringRef plugin_type_desc,
const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property,
+ llvm::StringRef description, bool is_global_property,
GetDebuggerPropertyForPluginsPtr get_debugger_property =
GetDebuggerPropertyForPlugins) {
if (properties_sp) {
bool PluginManager::CreateSettingForDynamicLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
- return CreateSettingForPlugin(
- debugger, ConstString(kDynamicLoaderPluginName),
- ConstString("Settings for dynamic loader plug-ins"), properties_sp,
- description, is_global_property);
+ llvm::StringRef description, bool is_global_property) {
+ return CreateSettingForPlugin(debugger, ConstString(kDynamicLoaderPluginName),
+ "Settings for dynamic loader plug-ins",
+ properties_sp, description, is_global_property);
}
lldb::OptionValuePropertiesSP
bool PluginManager::CreateSettingForPlatformPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
+ llvm::StringRef description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kPlatformPluginName),
- ConstString("Settings for platform plug-ins"),
- properties_sp, description, is_global_property,
+ "Settings for platform plug-ins", properties_sp,
+ description, is_global_property,
GetDebuggerPropertyForPluginsOldStyle);
}
bool PluginManager::CreateSettingForProcessPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
+ llvm::StringRef description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kProcessPluginName),
- ConstString("Settings for process plug-ins"),
- properties_sp, description, is_global_property);
+ "Settings for process plug-ins", properties_sp,
+ description, is_global_property);
}
bool PluginManager::CreateSettingForTracePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
+ llvm::StringRef description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kTracePluginName),
- ConstString("Settings for trace plug-ins"),
- properties_sp, description, is_global_property);
+ "Settings for trace plug-ins", properties_sp,
+ description, is_global_property);
}
lldb::OptionValuePropertiesSP
bool PluginManager::CreateSettingForObjectFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
- return CreateSettingForPlugin(
- debugger, ConstString(kObjectFilePluginName),
- ConstString("Settings for object file plug-ins"), properties_sp,
- description, is_global_property);
+ llvm::StringRef description, bool is_global_property) {
+ return CreateSettingForPlugin(debugger, ConstString(kObjectFilePluginName),
+ "Settings for object file plug-ins",
+ properties_sp, description, is_global_property);
}
lldb::OptionValuePropertiesSP
bool PluginManager::CreateSettingForSymbolFilePlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
- return CreateSettingForPlugin(
- debugger, ConstString(kSymbolFilePluginName),
- ConstString("Settings for symbol file plug-ins"), properties_sp,
- description, is_global_property);
+ llvm::StringRef description, bool is_global_property) {
+ return CreateSettingForPlugin(debugger, ConstString(kSymbolFilePluginName),
+ "Settings for symbol file plug-ins",
+ properties_sp, description, is_global_property);
}
lldb::OptionValuePropertiesSP
bool PluginManager::CreateSettingForJITLoaderPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
+ llvm::StringRef description, bool is_global_property) {
return CreateSettingForPlugin(debugger, ConstString(kJITLoaderPluginName),
- ConstString("Settings for JIT loader plug-ins"),
+ "Settings for JIT loader plug-ins",
properties_sp, description, is_global_property);
}
lldb::OptionValuePropertiesSP plugin_type_properties_sp(
GetDebuggerPropertyForPlugins(
debugger, ConstString(kOperatingSystemPluginName),
- ConstString(), // not creating to so we don't need the description
+ "", // not creating to so we don't need the description
false));
if (plugin_type_properties_sp)
properties_sp =
bool PluginManager::CreateSettingForOperatingSystemPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
+ llvm::StringRef description, bool is_global_property) {
if (properties_sp) {
lldb::OptionValuePropertiesSP plugin_type_properties_sp(
GetDebuggerPropertyForPlugins(
debugger, ConstString(kOperatingSystemPluginName),
- ConstString("Settings for operating system plug-ins"), true));
+ "Settings for operating system plug-ins", true));
if (plugin_type_properties_sp) {
plugin_type_properties_sp->AppendProperty(properties_sp->GetName(),
description, is_global_property,
bool PluginManager::CreateSettingForStructuredDataPlugin(
Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
- ConstString description, bool is_global_property) {
- return CreateSettingForPlugin(
- debugger, ConstString(kStructuredDataPluginName),
- ConstString("Settings for structured data plug-ins"), properties_sp,
- description, is_global_property);
+ llvm::StringRef description, bool is_global_property) {
+ return CreateSettingForPlugin(debugger,
+ ConstString(kStructuredDataPluginName),
+ "Settings for structured data plug-ins",
+ properties_sp, description, is_global_property);
}
}
void OptionValueProperties::AppendProperty(ConstString name,
- ConstString desc,
- bool is_global,
+ llvm::StringRef desc, bool is_global,
const OptionValueSP &value_sp) {
- Property property(name.GetStringRef(), desc.GetStringRef(), is_global,
- value_sp);
+ Property property(name.GetStringRef(), desc, is_global, value_sp);
m_name_to_index.Append(name, m_properties.size());
m_properties.push_back(property);
value_sp->SetParent(shared_from_this());
const bool is_global_setting = true;
PluginManager::CreateSettingForDynamicLoaderPlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the DynamicLoaderDarwinKernel plug-in."),
+ "Properties for the DynamicLoaderDarwinKernel plug-in.",
is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForJITLoaderPlugin(
debugger, GetGlobalPluginProperties().GetValueProperties(),
- ConstString("Properties for the JIT LoaderGDB plug-in."),
- is_global_setting);
+ "Properties for the JIT LoaderGDB plug-in.", is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForObjectFilePlugin(
debugger, GetGlobalPluginProperties().GetValueProperties(),
- ConstString("Properties for the PE/COFF object-file plug-in."),
- is_global_setting);
+ "Properties for the PE/COFF object-file plug-in.", is_global_setting);
}
}
const bool is_global_setting = false;
PluginManager::CreateSettingForPlatformPlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the Darwin platform plug-in."),
- is_global_setting);
+ "Properties for the Darwin platform plug-in.", is_global_setting);
OptionValueString *value = GetGlobalProperties().GetIgnoredExceptionValue();
value->SetValidator(ExceptionMaskValidator);
}
const bool is_global_setting = true;
PluginManager::CreateSettingForPlatformPlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the PlatformDarwinKernel plug-in."),
- is_global_setting);
+ "Properties for the PlatformDarwinKernel plug-in.", is_global_setting);
}
}
debugger, ConstString(GetPluginNameStatic()))) {
PluginManager::CreateSettingForPlatformPlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the qemu-user platform plugin."),
+ "Properties for the qemu-user platform plugin.",
/*is_global_property=*/true);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForProcessPlugin(
debugger, GetGlobalPluginProperties().GetValueProperties(),
- ConstString("Properties for the kdp-remote process plug-in."),
- is_global_setting);
+ "Properties for the kdp-remote process plug-in.", is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForProcessPlugin(
debugger, GetGlobalPluginProperties().GetValueProperties(),
- ConstString("Properties for the gdb-remote process plug-in."),
- is_global_setting);
+ "Properties for the gdb-remote process plug-in.", is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForStructuredDataPlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the darwin-log"
- " plug-in."),
- is_global_setting);
+ "Properties for the darwin-log plug-in.", is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForSymbolFilePlugin(
debugger, GetGlobalPluginProperties().GetValueProperties(),
- ConstString("Properties for the dwarf symbol-file plug-in."),
- is_global_setting);
+ "Properties for the dwarf symbol-file plug-in.", is_global_setting);
}
}
const bool is_global_setting = true;
PluginManager::CreateSettingForTracePlugin(
debugger, GetGlobalProperties().GetValueProperties(),
- ConstString("Properties for the intel-pt trace plug-in."),
- is_global_setting);
+ "Properties for the intel-pt trace plug-in.", is_global_setting);
}
}
std::make_shared<ProcessOptionValueProperties>(ConstString("process"));
m_collection_sp->Initialize(g_process_properties);
m_collection_sp->AppendProperty(
- ConstString("thread"), ConstString("Settings specific to threads."),
- true, Thread::GetGlobalProperties().GetValueProperties());
+ ConstString("thread"), "Settings specific to threads.", true,
+ Thread::GetGlobalProperties().GetValueProperties());
} else {
m_collection_sp =
OptionValueProperties::CreateLocalCopy(Process::GetGlobalProperties());
std::make_unique<ProcessExperimentalProperties>();
m_collection_sp->AppendProperty(
ConstString(Properties::GetExperimentalSettingsName()),
- ConstString("Experimental settings - setting these won't produce "
- "errors if the setting is not present."),
+ "Experimental settings - setting these won't produce "
+ "errors if the setting is not present.",
true, m_experimental_properties_up->GetValueProperties());
}
std::make_unique<TargetExperimentalProperties>();
m_collection_sp->AppendProperty(
ConstString(Properties::GetExperimentalSettingsName()),
- ConstString("Experimental settings - setting these won't produce "
- "errors if the setting is not present."),
+ "Experimental settings - setting these won't produce "
+ "errors if the setting is not present.",
true, m_experimental_properties_up->GetValueProperties());
} else {
m_collection_sp =
std::make_unique<TargetExperimentalProperties>();
m_collection_sp->AppendProperty(
ConstString(Properties::GetExperimentalSettingsName()),
- ConstString("Experimental settings - setting these won't produce "
- "errors if the setting is not present."),
+ "Experimental settings - setting these won't produce "
+ "errors if the setting is not present.",
true, m_experimental_properties_up->GetValueProperties());
m_collection_sp->AppendProperty(
- ConstString("process"), ConstString("Settings specific to processes."),
- true, Process::GetGlobalProperties().GetValueProperties());
+ ConstString("process"), "Settings specific to processes.", true,
+ Process::GetGlobalProperties().GetValueProperties());
m_collection_sp->SetValueChangedCallback(
ePropertySaveObjectsDir, [this] { CheckJITObjectsDir(); });
}
const bool is_global = false;
auto dict_sp = std::make_shared<OptionValueDictionary>(1 << eTypeUInt64);
- props_sp->AppendProperty(ConstString("dict"), ConstString(), is_global,
- dict_sp);
+ props_sp->AppendProperty(ConstString("dict"), "", is_global, dict_sp);
auto file_list_sp = std::make_shared<OptionValueFileSpecList>();
- props_sp->AppendProperty(ConstString("file-list"), ConstString(), is_global,
+ props_sp->AppendProperty(ConstString("file-list"), "", is_global,
file_list_sp);
return props_sp;
}