diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Interpreter/OptionValueProperties.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/Platform.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/Process.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Target/Target.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Target/Thread.cpp | 3 |
16 files changed, 21 insertions, 39 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 1aeec7bdb79..b7bf76be4ff 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -278,8 +278,7 @@ static constexpr PropertyDefinition g_properties[] = { {"frame-format-unique", OptionValue::eTypeFormatEntity, true, 0, DEFAULT_FRAME_FORMAT_NO_ARGS, {}, "The default frame format string to use when displaying stack frame" - "information for threads from thread backtrace unique."}, - {nullptr, OptionValue::eTypeInvalid, true, 0, nullptr, {}, nullptr}}; + "information for threads from thread backtrace unique."}}; enum { ePropertyAutoConfirm = 0, diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 090864b287a..81c9c4a3f03 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -74,8 +74,7 @@ static constexpr PropertyDefinition g_properties[] = { "the UUID of the executable."}, {"clang-modules-cache-path", OptionValue::eTypeFileSpec, true, 0, nullptr, {}, - "The path to the clang modules cache directory (-fmodules-cache-path)."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + "The path to the clang modules cache directory (-fmodules-cache-path)."}}; enum { ePropertyEnableExternalLookup, ePropertyClangModulesCachePath }; diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 77fdeb1d848..c57debab6f3 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -89,8 +89,7 @@ static constexpr PropertyDefinition g_properties[] = { nullptr, {}, "If true, LLDB will stop running a 'command source' " "script upon encountering an error."}, {"space-repl-prompts", OptionValue::eTypeBoolean, true, false, nullptr, {}, - "If true, blank lines will be printed between between REPL submissions."}, - {nullptr, OptionValue::eTypeInvalid, true, 0, nullptr, {}, nullptr}}; + "If true, blank lines will be printed between between REPL submissions."}}; enum { ePropertyExpandRegexAliases = 0, diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp index c1887f34b71..4a1daecb33e 100644 --- a/lldb/source/Interpreter/OptionValueProperties.cpp +++ b/lldb/source/Interpreter/OptionValueProperties.cpp @@ -53,9 +53,9 @@ size_t OptionValueProperties::GetNumProperties() const { return m_properties.size(); } -void OptionValueProperties::Initialize(const PropertyDefinition *defs) { - for (size_t i = 0; defs[i].name; ++i) { - Property property(defs[i]); +void OptionValueProperties::Initialize(const PropertyDefinitions &defs) { + for (const auto &definition : defs) { + Property property(definition); assert(property.IsValid()); m_name_to_index.Append(ConstString(property.GetName()), m_properties.size()); property.GetValue()->SetParent(shared_from_this()); diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 92d50378a97..979bb4e18f9 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -76,8 +76,7 @@ static constexpr PropertyDefinition g_properties[] = { {"scan-type", OptionValue::eTypeEnum, true, eKASLRScanNearPC, NULL, OptionEnumValues(g_kaslr_kernel_scan_enum_values), "Control how many reads lldb will make while searching for a Darwin " - "kernel on attach."}, - {NULL, OptionValue::eTypeInvalid, false, 0, NULL, {}, NULL} }; + "kernel on attach."}}; enum { ePropertyLoadKexts, ePropertyScanType }; diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp index 1a2b025c7ea..48189d24984 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -61,8 +61,7 @@ namespace { static constexpr PropertyDefinition g_properties[] = { {"enable-jit-breakpoint", OptionValue::eTypeBoolean, true, true, nullptr, - {}, "Enable breakpoint on __jit_debug_register_code."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + {}, "Enable breakpoint on __jit_debug_register_code."}}; enum { ePropertyEnableJITBreakpoint }; diff --git a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp index 0b17d26a317..600a67fc6f8 100644 --- a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp +++ b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp @@ -48,8 +48,7 @@ namespace { static constexpr PropertyDefinition g_properties[] = { {"enable", OptionValue::eTypeBoolean, true, true, nullptr, {}, - "Specify whether goroutines should be treated as threads."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + "Specify whether goroutines should be treated as threads."}}; enum { ePropertyEnableGoroutines, diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp index 27b9c635232..ba1bd60f48f 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -186,14 +186,13 @@ const char *PlatformDarwinKernel::GetDescriptionStatic() { /// Code to handle the PlatformDarwinKernel settings //------------------------------------------------------------------ -static PropertyDefinition g_properties[] = { +static constexpr PropertyDefinition g_properties[] = { {"search-locally-for-kexts", OptionValue::eTypeBoolean, true, true, NULL, {}, "Automatically search for kexts on the local system when doing " "kernel debugging."}, {"kext-directories", OptionValue::eTypeFileSpecList, false, 0, NULL, {}, "Directories/KDKs to search for kexts in when starting a kernel debug " - "session."}, - {NULL, OptionValue::eTypeInvalid, false, 0, NULL, {}, NULL}}; + "session."}}; enum { ePropertySearchForKexts = 0, ePropertyKextDirectories }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index f19ebc25874..2f174932f7a 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -55,10 +55,9 @@ using namespace lldb_private; namespace { -static PropertyDefinition g_properties[] = { +static constexpr PropertyDefinition g_properties[] = { {"packet-timeout", OptionValue::eTypeUInt64, true, 5, NULL, {}, - "Specify the default packet timeout in seconds."}, - {NULL, OptionValue::eTypeInvalid, false, 0, NULL, {}, NULL}}; + "Specify the default packet timeout in seconds."}}; enum { ePropertyPacketTimeout }; diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index b06fc07bb6f..d367b23ce19 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -114,8 +114,7 @@ static constexpr PropertyDefinition g_properties[] = { {"packet-timeout", OptionValue::eTypeUInt64, true, 1, NULL, {}, "Specify the default packet timeout in seconds."}, {"target-definition-file", OptionValue::eTypeFileSpec, true, 0, NULL, {}, - "The file that provides the description for remote target registers."}, - {NULL, OptionValue::eTypeInvalid, false, 0, NULL, {}, NULL}}; + "The file that provides the description for remote target registers."}}; enum { ePropertyPacketTimeout, ePropertyTargetDefinitionFile }; diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp index 13af49cb5f5..d00a17d39e6 100644 --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -133,9 +133,7 @@ static constexpr PropertyDefinition g_properties[] = { "Specify the options to 'plugin structured-data darwin-log enable' " "that should be applied when automatically enabling logging on " "startup/attach." // description - }, - // Last entry sentinel. - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + }}; enum { ePropertyEnableOnStartup = 0, ePropertyAutoEnableOptions = 1 }; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index f895c9e376c..1c5150009fc 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -118,9 +118,7 @@ static constexpr PropertyDefinition g_properties[] = { "links will be resolved at DWARF parse time."}, {"ignore-file-indexes", OptionValue::eTypeBoolean, true, 0, nullptr, {}, "Ignore indexes present in the object files and always index DWARF " - "manually."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}, -}; + "manually."}}; enum { ePropertySymLinkPaths, diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 658607c7fca..07f1e47c6a4 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -71,8 +71,7 @@ static constexpr PropertyDefinition g_properties[] = { {"use-module-cache", OptionValue::eTypeBoolean, true, true, nullptr, {}, "Use module cache."}, {"module-cache-directory", OptionValue::eTypeFileSpec, true, 0, nullptr, - {}, "Root directory for cached modules."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + {}, "Root directory for cached modules."}}; enum { ePropertyUseModuleCache, ePropertyModuleCacheDirectory }; diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 88d7ef11891..93b9e3f0b73 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -147,8 +147,7 @@ static constexpr PropertyDefinition g_properties[] = { "stepping and variable availability may not behave as expected."}, {"stop-on-exec", OptionValue::eTypeBoolean, true, true, nullptr, {}, - "If true, stop when a shared library is loaded or unloaded."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + "If true, stop when a shared library is loaded or unloaded."}}; enum { ePropertyDisableMemCache, diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 8ba121d0c9b..4f58894d273 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -3352,8 +3352,7 @@ static constexpr PropertyDefinition g_properties[] = { nullptr, {}, "If true, LLDB will show variables that are meant to " "support the operation of a language's runtime support."}, {"non-stop-mode", OptionValue::eTypeBoolean, false, 0, nullptr, {}, - "Disable lock-step debugging, instead control threads independently."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + "Disable lock-step debugging, instead control threads independently."}}; enum { ePropertyDefaultArch, @@ -3483,8 +3482,7 @@ static constexpr PropertyDefinition g_experimental_properties[]{ "ivars and local variables. " "But it can make expressions run much more slowly."}, {"use-modern-type-lookup", OptionValue::eTypeBoolean, true, false, nullptr, - {}, "If true, use Clang's modern type lookup infrastructure."}, - {nullptr, OptionValue::eTypeInvalid, true, 0, nullptr, {}, nullptr}}; + {}, "If true, use Clang's modern type lookup infrastructure."}}; enum { ePropertyInjectLocalVars = 0, ePropertyUseModernTypeLookup }; diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index aa093d667ff..39a56985b90 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -80,8 +80,7 @@ static constexpr PropertyDefinition g_properties[] = { {"trace-thread", OptionValue::eTypeBoolean, false, false, nullptr, {}, "If true, this thread will single-step and log execution."}, {"max-backtrace-depth", OptionValue::eTypeUInt64, false, 300000, nullptr, - {}, "Maximum number of frames to backtrace."}, - {nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, {}, nullptr}}; + {}, "Maximum number of frames to backtrace."}}; enum { ePropertyStepInAvoidsNoDebug, |