[Lldb-commits] [lldb] [lldb] Generate option enums from TableGen (PR #224640)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 18 08:58:22 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Nerixyz (Nerixyz)
<details>
<summary>Changes</summary>
A while back, I added documentation for settings on the lldb website. This is based on the TableGen definitions for the settings.
One thing that's missing on that page is a way to see the accepted enum values and a default value for enum settings. The problem was that enums are in source/header files, so we didn't find them when reading just the TableGen files.
In this PR, I added a TabelGen schema for the enum definitions and migrated the existing definitions to TableGen. For the migration, I used an LLM, since that's mostly copy-paste work.
We have two headers with enum descriptions - `ModuleList.h` and `CommandOptionArgumentTable.h`. I followed how Clang does it and added a `CMakeLists.txt` in the respective directory. The main `lldb/CMakeLists.txt` first adds `include` as a subdirectory and then adds the TableGen targets to `LLVM_COMMON_DEPENDS`.
Assisted-By: GitHub Copilot (MAI-Code-1.1-Flash, GPT-5.6 Luna)
---
Patch is 63.43 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/224640.diff
39 Files Affected:
- (modified) lldb/CMakeLists.txt (+7)
- (modified) lldb/cmake/modules/AddLLDB.cmake (+5-1)
- (added) lldb/include/CMakeLists.txt (+1)
- (added) lldb/include/lldb/CMakeLists.txt (+2)
- (added) lldb/include/lldb/Core/CMakeLists.txt (+3)
- (added) lldb/include/lldb/Core/EnumsBase.td (+28)
- (modified) lldb/include/lldb/Core/ModuleList.h (+3-42)
- (added) lldb/include/lldb/Core/ModuleListEnums.td (+22)
- (added) lldb/include/lldb/Interpreter/CMakeLists.txt (+3)
- (modified) lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h (+14-229)
- (added) lldb/include/lldb/Interpreter/CommandOptionArgumentTableEnums.td (+155)
- (modified) lldb/source/Core/CMakeLists.txt (+6-1)
- (modified) lldb/source/Core/CoreProperties.td (+1-1)
- (modified) lldb/source/Core/Debugger.cpp (+6-99)
- (added) lldb/source/Core/DebuggerEnums.td (+54)
- (modified) lldb/source/Interpreter/CMakeLists.txt (+6-1)
- (modified) lldb/source/Interpreter/OptionGroupWatchpoint.cpp (+2-22)
- (added) lldb/source/Interpreter/OptionGroupWatchpointEnums.td (+8)
- (modified) lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt (+6-1)
- (modified) lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (+2-25)
- (added) lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernelEnums.td (+15)
- (modified) lldb/source/Plugins/JITLoader/GDB/CMakeLists.txt (+6-1)
- (modified) lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (+2-18)
- (added) lldb/source/Plugins/JITLoader/GDB/JITLoaderGDBEnums.td (+8)
- (modified) lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt (+6-1)
- (modified) lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (+2-17)
- (added) lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFFEnums.td (+8)
- (modified) lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt (+6-1)
- (modified) lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (+2-18)
- (added) lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDBEnums.td (+9)
- (modified) lldb/source/Target/CMakeLists.txt (+11-1)
- (modified) lldb/source/Target/Process.cpp (+2-12)
- (added) lldb/source/Target/ProcessEnums.td (+9)
- (modified) lldb/source/Target/Target.cpp (+14-189)
- (added) lldb/source/Target/TargetEnums.td (+91)
- (modified) lldb/utils/TableGen/CMakeLists.txt (+1)
- (added) lldb/utils/TableGen/LLDBOptionEnumDefEmitter.cpp (+50)
- (modified) lldb/utils/TableGen/LLDBTableGen.cpp (+6)
- (modified) lldb/utils/TableGen/LLDBTableGenBackends.h (+1)
``````````diff
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 7f45487c1d2d7..15dc84dca16b5 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -167,6 +167,13 @@ endif()
# TableGen
add_subdirectory(utils/TableGen)
+add_subdirectory(include)
+
+get_property(LLDB_TABLEGEN_TARGETS GLOBAL PROPERTY LLDB_TABLEGEN_TARGETS)
+add_custom_target(lldb-header-tablegen-targets DEPENDS ${LLDB_TABLEGEN_TARGETS})
+set_target_properties(lldb-header-tablegen-targets PROPERTIES FOLDER "lldb/Tablegenning/Targets")
+list(APPEND LLVM_COMMON_DEPENDS lldb-header-tablegen-targets)
+
add_subdirectory(source)
add_subdirectory(tools)
add_subdirectory(docs)
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 6dfcc87dd5be3..2b5d7108e2d1e 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/lldb/cmake/modules/AddLLDB.cmake
@@ -34,10 +34,14 @@ function(lldb_tablegen)
if(LTG_TARGET)
add_public_tablegen_target(${LTG_TARGET})
- set_property(GLOBAL APPEND PROPERTY LLDB_TABLEGEN_TARGETS ${LTG_TARGET})
endif()
+
if("-dump-json" IN_LIST ARGN)
set_property(GLOBAL APPEND PROPERTY LLDB_DOCS_JSON_OUTPUTS "${TABLEGEN_OUTPUT}")
+ elseif(LTG_TARGET)
+ # Only add non-JSON targets to the list of all targets. They're collected
+ # from all includes and we don't need JSON files to build lldb.
+ set_property(GLOBAL APPEND PROPERTY LLDB_TABLEGEN_TARGETS ${LTG_TARGET})
endif()
endfunction(lldb_tablegen)
diff --git a/lldb/include/CMakeLists.txt b/lldb/include/CMakeLists.txt
new file mode 100644
index 0000000000000..9f0cc9593eef7
--- /dev/null
+++ b/lldb/include/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(lldb)
diff --git a/lldb/include/lldb/CMakeLists.txt b/lldb/include/lldb/CMakeLists.txt
new file mode 100644
index 0000000000000..5cd7bf3cfa5c3
--- /dev/null
+++ b/lldb/include/lldb/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(Core)
+add_subdirectory(Interpreter)
diff --git a/lldb/include/lldb/Core/CMakeLists.txt b/lldb/include/lldb/Core/CMakeLists.txt
new file mode 100644
index 0000000000000..9a29e181e5571
--- /dev/null
+++ b/lldb/include/lldb/Core/CMakeLists.txt
@@ -0,0 +1,3 @@
+lldb_tablegen(ModuleListEnums.inc -gen-lldb-option-enum-defs
+ SOURCE ModuleListEnums.td
+ TARGET LLDBModuleListEnumsGen)
diff --git a/lldb/include/lldb/Core/EnumsBase.td b/lldb/include/lldb/Core/EnumsBase.td
new file mode 100644
index 0000000000000..3ca4e953df53b
--- /dev/null
+++ b/lldb/include/lldb/Core/EnumsBase.td
@@ -0,0 +1,28 @@
+class EnumValue<string value, string name, string description> {
+ /// The suffix of the enumerator.
+ /// For example `Public` for a prefix of `eAccessType` (set in `EnumDef`).
+ string Value = value;
+ /// The user-visible name of this value. Usually kebab-case.
+ string Name = name;
+ /// A description for this value.
+ string Description = description;
+}
+
+/// Usage:
+/// ```
+/// def script_languages : EnumDef<"lldb::eScriptLanguage", [
+/// EnumValue<"Python", "python", "something about Python">,
+/// EnumValue<"Lua", "lua", "something about Lua">,
+/// // ...
+/// ]>;
+/// ```
+/// This will result in a `g_script_languages` definition.
+class EnumDef<string prefix, list<EnumValue> values> {
+ /// Prefix prepended to all `Value`s in `Values`.
+ /// For example, if the prefix is `lldb::eScriptLanguage`, then
+ /// `EnumValue<"Python", "python", "..">` will result in
+ /// `lldb::eScriptLanguagePython` being added.
+ string Prefix = prefix;
+
+ list<EnumValue> Values = values;
+}
diff --git a/lldb/include/lldb/Core/ModuleList.h b/lldb/include/lldb/Core/ModuleList.h
index aa0e7c674c1d2..c8c55a7b97f07 100644
--- a/lldb/include/lldb/Core/ModuleList.h
+++ b/lldb/include/lldb/Core/ModuleList.h
@@ -48,48 +48,9 @@ class UUID;
class VariableList;
struct ModuleFunctionSearchOptions;
-static constexpr OptionEnumValueElement g_auto_download_enum_values[] = {
- {
- lldb::eSymbolDownloadOff,
- "off",
- "Disable automatically downloading symbols.",
- },
- {
- lldb::eSymbolDownloadBackground,
- "background",
- "Download symbols in the background for images as they appear in the "
- "backtrace.",
- },
- {
- lldb::eSymbolDownloadForeground,
- "foreground",
- "Download symbols in the foreground for images as they appear in the "
- "backtrace.",
- },
-};
-
-static constexpr OptionEnumValueElement g_shared_cache_use_enum_values[] = {
- {
- lldb::eSymbolSharedCacheUseHostLLDBMemory,
- "host-lldb-memory",
- "Get binaries from the host lldb in-memory shared cache.",
- },
- {
- lldb::eSymbolSharedCacheUseHostSharedCache,
- "host-shared-cache",
- "Get binaries from the host shared cache.",
- },
- {
- lldb::eSymbolSharedCacheUseHostAndInferiorSharedCache,
- "host-and-inferior-shared-cache",
- "Get binaries from the host and inferior's shared caches.",
- },
- {
- lldb::eSymbolSharedCacheUseInferiorSharedCacheOnly,
- "inferior-shared-cache-only",
- "Get binaries from inferior's shared cache only.",
- },
-};
+#define LLDB_ENUMS_auto_download_enum_values
+#define LLDB_ENUMS_shared_cache_use_enum_values
+#include "lldb/Core/ModuleListEnums.inc"
class ModuleListProperties : public Properties {
mutable llvm::sys::RWMutex m_symlink_paths_mutex;
diff --git a/lldb/include/lldb/Core/ModuleListEnums.td b/lldb/include/lldb/Core/ModuleListEnums.td
new file mode 100644
index 0000000000000..98fc7eb566a93
--- /dev/null
+++ b/lldb/include/lldb/Core/ModuleListEnums.td
@@ -0,0 +1,22 @@
+include "EnumsBase.td"
+
+def auto_download_enum_values : EnumDef<"lldb::eSymbolDownload", [
+ EnumValue<"Off", "off", "Disable automatically downloading symbols.">,
+ EnumValue<"Background", "background",
+ "Download symbols in the background for images as they appear in the "
+ "backtrace.">,
+ EnumValue<"Foreground", "foreground",
+ "Download symbols in the foreground for images as they appear in the "
+ "backtrace.">,
+]>;
+
+def shared_cache_use_enum_values : EnumDef<"lldb::eSymbolSharedCacheUse", [
+ EnumValue<"HostLLDBMemory", "host-lldb-memory",
+ "Get binaries from the host lldb in-memory shared cache.">,
+ EnumValue<"HostSharedCache", "host-shared-cache",
+ "Get binaries from the host shared cache.">,
+ EnumValue<"HostAndInferiorSharedCache", "host-and-inferior-shared-cache",
+ "Get binaries from the host and inferior's shared caches.">,
+ EnumValue<"InferiorSharedCacheOnly", "inferior-shared-cache-only",
+ "Get binaries from inferior's shared cache only.">,
+]>;
diff --git a/lldb/include/lldb/Interpreter/CMakeLists.txt b/lldb/include/lldb/Interpreter/CMakeLists.txt
new file mode 100644
index 0000000000000..9c9511f6abc43
--- /dev/null
+++ b/lldb/include/lldb/Interpreter/CMakeLists.txt
@@ -0,0 +1,3 @@
+lldb_tablegen(CommandOptionArgumentTableEnums.inc -gen-lldb-option-enum-defs
+ SOURCE CommandOptionArgumentTableEnums.td
+ TARGET LLDBCommandOptionArgumentTableEnumsGen)
diff --git a/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h b/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
index 7075a7acb9733..92974f5603dfa 100644
--- a/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
+++ b/lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
@@ -13,235 +13,20 @@
namespace lldb_private {
-static constexpr OptionEnumValueElement g_corefile_save_style[] = {
- {lldb::eSaveCoreFull, "full", "Create a core file with all memory saved"},
- {lldb::eSaveCoreDirtyOnly, "modified-memory",
- "Create a corefile with only modified memory saved"},
- {lldb::eSaveCoreStackOnly, "stack",
- "Create a corefile with only stack memory saved"},
-};
-
-static constexpr OptionEnumValueElement g_description_verbosity_type[] = {
- {
- eLanguageRuntimeDescriptionDisplayVerbosityCompact,
- "compact",
- "Only show the description string",
- },
- {
- eLanguageRuntimeDescriptionDisplayVerbosityFull,
- "full",
- "Show the full output, including persistent variable's name and type",
- },
-};
-
-static constexpr OptionEnumValueElement g_sort_option_enumeration[] = {
- {
- eSortOrderNone,
- "none",
- "No sorting, use the original symbol table order.",
- },
- {
- eSortOrderByAddress,
- "address",
- "Sort output by symbol address.",
- },
- {
- eSortOrderByName,
- "name",
- "Sort output by symbol name.",
- },
- {
- eSortOrderBySize,
- "size",
- "Sort output by symbol byte size.",
- },
-};
-
-// Note that the negation in the argument name causes a slightly confusing
-// mapping of the enum values.
-static constexpr OptionEnumValueElement g_dependents_enumeration[] = {
- {
- eLoadDependentsDefault,
- "default",
- "Only load dependents when the target is an executable.",
- },
- {
- eLoadDependentsNo,
- "true",
- "Don't load dependents, even if the target is an executable.",
- },
- {
- eLoadDependentsYes,
- "false",
- "Load dependents, even if the target is not an executable.",
- },
-};
-
-// FIXME: "script-type" needs to have its contents determined dynamically, so
-// somebody can add a new scripting language to lldb and have it pickable here
-// without having to change this enumeration by hand and rebuild lldb proper.
-static constexpr OptionEnumValueElement g_script_option_enumeration[] = {
- {
- lldb::eScriptLanguageNone,
- "command",
- "Commands are in the lldb command interpreter language",
- },
- {
- lldb::eScriptLanguagePython,
- "python",
- "Commands are in the Python language.",
- },
- {
- lldb::eScriptLanguageLua,
- "lua",
- "Commands are in the Lua language.",
- },
- {
- lldb::eScriptLanguageNone,
- "default",
- "Commands are in the default scripting language.",
- },
-};
-
-static constexpr OptionEnumValueElement g_log_handler_type[] = {
- {
- eLogHandlerDefault,
- "default",
- "Use the default (stream) log handler",
- },
- {
- eLogHandlerStream,
- "stream",
- "Write log messages to the debugger output stream or to a file if one "
- "is specified. A buffer size (in bytes) can be specified with -b. If "
- "no buffer size is specified the output is unbuffered.",
- },
- {
- eLogHandlerCircular,
- "circular",
- "Write log messages to a fixed size circular buffer. A buffer size "
- "(number of messages) must be specified with -b.",
- },
- {
- eLogHandlerSystem,
- "os",
- "Write log messages to the operating system log.",
- },
-};
-
-static constexpr OptionEnumValueElement g_script_synchro_type[] = {
- {
- eScriptedCommandSynchronicitySynchronous,
- "synchronous",
- "Run synchronous",
- },
- {
- eScriptedCommandSynchronicityAsynchronous,
- "asynchronous",
- "Run asynchronous",
- },
- {
- eScriptedCommandSynchronicityCurrentValue,
- "current",
- "Do not alter current setting",
- },
-};
-
-static constexpr OptionEnumValueElement g_running_mode[] = {
- {lldb::eOnlyThisThread, "this-thread", "Run only this thread"},
- {lldb::eAllThreads, "all-threads", "Run all threads"},
- {lldb::eOnlyDuringStepping, "while-stepping",
- "Run only this thread while stepping"},
-};
-
-static constexpr OptionEnumValueElement g_exception_stage[] = {
- {lldb::eExceptionStageThrow, "throw", "Stop when the exception is thrown."},
- {lldb::eExceptionStageReThrow, "re-throw",
- "Stop when the exception is re-thrown."},
- {lldb::eExceptionStageCatch, "catch", "Stop when the exception is caught."},
-};
-
-static constexpr OptionEnumValueElement g_name_match_style[] = {
- {lldb::eNameMatchStyleAuto, "auto",
- "Match against the leaf nodes of the identifier, or against methods or "
- "selectors."},
- {lldb::eNameMatchStyleFull, "full", "Match the full identifier name."},
- {lldb::eNameMatchStyleBase, "base",
- "Match against the leaf node of the identifier."},
- {lldb::eNameMatchStyleMethod, "method", "Match only against method names."},
- {lldb::eNameMatchStyleSelector, "selector",
- "Match only against selector names."},
- {lldb::eNameMatchStyleRegex, "regex",
- "Match the identifier using a regular expression."},
-};
-
-static constexpr OptionEnumValueElement g_plugin_domain_values[] = {
- {lldb::ePluginDomainKindGlobal, "global",
- "Apply to all debugger instances."},
- {lldb::ePluginDomainKindDebugger, "debugger",
- "Apply to the current debugger instance."},
- {lldb::ePluginDomainKindTarget, "target", "Apply to the current target."},
-};
-
-static constexpr OptionEnumValueElement g_resolver_mask_values[] = {
- {lldb::eResolverFileAndLine, "file_and_line",
- "Matches file and line breakpoint resolvers."},
- {lldb::eResolverAddress, "address",
- "Matches address breakpoint resolvers."},
- {lldb::eResolverName, "name", "Matches symbol name breakpoint resolvers."},
- {lldb::eResolverFileRegex, "source",
- "Matches source text pattern resolvers."},
- {lldb::eResolverPython, "scripted",
- "Matches scripted breakpoint resolvers."},
- {lldb::eResolverException, "exception",
- "Matches language exception breakpoint resolvers."},
-};
-
-static constexpr OptionEnumValueElement g_completion_type[] = {
- {lldb::eNoCompletion, "none", "No completion."},
- {lldb::eSourceFileCompletion, "source-file", "Completes to a source file."},
- {lldb::eDiskFileCompletion, "disk-file", "Completes to a disk file."},
- {lldb::eDiskDirectoryCompletion, "disk-directory",
- "Completes to a disk directory."},
- {lldb::eSymbolCompletion, "symbol", "Completes to a symbol."},
- {lldb::eModuleCompletion, "module", "Completes to a module."},
- {lldb::eSettingsNameCompletion, "settings-name",
- "Completes to a settings name."},
- {lldb::ePlatformPluginCompletion, "platform-plugin",
- "Completes to a platform plugin."},
- {lldb::eArchitectureCompletion, "architecture",
- "Completes to a architecture."},
- {lldb::eVariablePathCompletion, "variable-path",
- "Completes to a variable path."},
- {lldb::eRegisterCompletion, "register", "Completes to a register."},
- {lldb::eBreakpointCompletion, "breakpoint", "Completes to a breakpoint."},
- {lldb::eProcessPluginCompletion, "process-plugin",
- "Completes to a process plugin."},
- {lldb::eDisassemblyFlavorCompletion, "disassembly-flavor",
- "Completes to a disassembly flavor."},
- {lldb::eTypeLanguageCompletion, "type-language",
- "Completes to a type language."},
- {lldb::eFrameIndexCompletion, "frame-index", "Completes to a frame index."},
- {lldb::eModuleUUIDCompletion, "module-uuid", "Completes to a module uuid."},
- {lldb::eStopHookIDCompletion, "stophook-id", "Completes to a stophook id."},
- {lldb::eThreadIndexCompletion, "thread-index",
- "Completes to a thread index."},
- {lldb::eWatchpointIDCompletion, "watchpoint-id",
- "Completes to a watchpoint id."},
- {lldb::eBreakpointNameCompletion, "breakpoint-name",
- "Completes to a breakpoint name."},
- {lldb::eProcessIDCompletion, "process-id", "Completes to a process id."},
- {lldb::eProcessNameCompletion, "process-name",
- "Completes to a process name."},
- {lldb::eRemoteDiskFileCompletion, "remote-disk-file",
- "Completes to a remote disk file."},
- {lldb::eRemoteDiskDirectoryCompletion, "remote-disk-directory",
- "Completes to a remote disk directory."},
- {lldb::eTypeCategoryNameCompletion, "type-category-name",
- "Completes to a type category name."},
- {lldb::eCustomCompletion, "custom", "Custom completion."},
- {lldb::eThreadIDCompletion, "thread-id", "Completes to a thread ID."},
-};
+#define LLDB_ENUMS_completion_type
+#define LLDB_ENUMS_corefile_save_style
+#define LLDB_ENUMS_dependents_enumeration
+#define LLDB_ENUMS_description_verbosity_type
+#define LLDB_ENUMS_exception_stage
+#define LLDB_ENUMS_log_handler_type
+#define LLDB_ENUMS_name_match_style
+#define LLDB_ENUMS_plugin_domain_values
+#define LLDB_ENUMS_resolver_mask_values
+#define LLDB_ENUMS_running_mode
+#define LLDB_ENUMS_script_option_enumeration
+#define LLDB_ENUMS_script_synchro_type
+#define LLDB_ENUMS_sort_option_enumeration
+#include "lldb/Interpreter/CommandOptionArgumentTableEnums.inc"
llvm::StringRef RegisterNameHelpTextCallback();
llvm::StringRef BreakpointIDHelpTextCallback();
diff --git a/lldb/include/lldb/Interpreter/CommandOptionArgumentTableEnums.td b/lldb/include/lldb/Interpreter/CommandOptionArgumentTableEnums.td
new file mode 100644
index 0000000000000..cfbd1e886b664
--- /dev/null
+++ b/lldb/include/lldb/Interpreter/CommandOptionArgumentTableEnums.td
@@ -0,0 +1,155 @@
+include "../Core/EnumsBase.td"
+
+def corefile_save_style : EnumDef<"lldb::eSaveCore", [
+ EnumValue<"Full", "full", "Create a core file with all memory saved">,
+ EnumValue<"DirtyOnly", "modified-memory",
+ "Create a corefile with only modified memory saved">,
+ EnumValue<"StackOnly", "stack",
+ "Create a corefile with only stack memory saved">,
+]>;
+
+def description_verbosity_type : EnumDef<"eLanguageRuntimeDescriptionDisplayVerbosity", [
+ EnumValue<"Compact", "compact", "Only show the description string">,
+ EnumValue<"Full", "full",
+ "Show the full output, including persistent variable's name and type">,
+]>;
+
+def sort_option_enumeration : EnumDef<"eSortOrder", [
+ EnumValue<"None", "none", "No sorting, use the original symbol table order.">,
+ EnumValue<"ByAddress", "address", "Sort output by symbol address.">,
+ EnumValue<"ByName", "name", "Sort output by symbol name.">,
+ EnumValue<"BySize", "size", "Sort output by symbol byte size.">,
+]>;
+
+
+// Note that the negation in the argument name causes a slightly confusing
+// mapping of the enum values.
+def dependents_enumeration : EnumDef<"eLoadDependents", [
+ EnumValue<"Default", "default",
+ "Only load dependents when the target is an executable.">,
+ EnumValue<"No", "true",
+ "Don't load dependents, even if the target is an executable.">,
+ EnumValue<"Yes", "false",
+ "Load dependents, even if the target is not an executable.">,
+]>;
+
+// FIXME: "script-type" needs to have its contents determined dynamically, so
+// somebody can add a new scripting language to lldb and have it pickable here
+// without having to change this enumeration by hand and rebuild lldb proper.
+def script_option_enumeration : EnumDef<"lldb::eScriptLanguage", [
+ EnumValue<"None", "command",
+ "Commands are in the lldb command interpreter language">,
+ EnumValue<"Python", "python", "Commands are in the Python language.">,
+ EnumValue<"Lua", "lua", "Commands are in the Lua language.">,
+ EnumValue<"None", "default", "Commands are in the default scripting language.">,
+]>;
+
+def log_handler_type : EnumDef<"eLogHandler", [
+ EnumValue<"Default", "default", "Use the default (stream) log handler">,
+ EnumValue<"Stream", "stream",
+ "Write log messages to the debugger output stream or to a file if one is specified. "
+ "A buffer size (in bytes) can be specified with -b. "
+ "If no buffer size is specified the output is unbuffered.">,
+ EnumValue<"Circular", "circular",
+ "Write log messages to a fixed size circular buffer. "
+ "A buffer size (number of messages) must be specified with -b.">,
+ EnumValue<"System", "os", "Write log messages to the operating system log.">,
+]>;
+
+def script_synchro_type : EnumDef<"eScriptedCommandSynchronicity", [
+ EnumValue<"Synchronous", "synchronous", "Run synchronous">,
+ EnumValue<"Asynchronous", "asynchronous", "Run asynchronous">,
+ EnumValue<"CurrentValue", "current", "Do not alter current setting">,
+]>;
+
+def running_mode : EnumDef<"lldb::", [
+ EnumValue<"eOnlyThisThread", "this-thread", "Run only this thread">,
+ EnumValue<"eAllThreads", "all-threads", "Run all threads">,
+ EnumValue<"eOnlyDuringStepping", "while-stepping",
+ "Run only this thread while stepping">,
+]>;
+
+def exception_stage : EnumDef<"lldb::eExceptionStage", [
+...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/224640
More information about the lldb-commits
mailing list