From cdbe28887bc9b4740f990dd5b3d8a86e9b14c131 Mon Sep 17 00:00:00 2001 From: Nerixyz Date: Tue, 10 Feb 2026 19:43:29 +0100 Subject: [LLDB] Set and verify paths of properties from tablegen (#179524) In #168245, I attempted to dump the available settings to Markdown. That required a full build of LLDB. However, to build the docs, only the swig wrappers should need to be compiled. The comment was that we should be able to use the definitions from the TableGen files. Currently, the property definitions in don't have information about the path where they will be available. They only contain a `Definition` which groups properties, so they can be added to `OptionValueProperties`. With this PR, I'm adding the path for each property definition. For example, `symbols.enable-external-lookup` would have `Name = enable-external-lookup, Path = symbols`. In LLDB itself, we don't need this path, we only need it for the documentation. To avoid mismatches between the actual path and the declared one, I added a debug-only check when a property group is added to a parent (`OptionValueProperties::AppendProperty`). The TableGen emitter for the properties now additionally emits `g_{definition}_properties_def`, which includes both the array of properties and the expected path. This constant has to be used to initialize a `OptionValueProperties`. I couldn't test this for everything (e.g. IntelPT or ProcessKDP), but the necessary changes are simple: (1) set the `Path` in the TableGen file, (2) update `initialize` to use `_def`. --- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp') diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index cf2f84677b0f..3a17b4c46a78 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -86,7 +86,7 @@ public: PluginProperties() { m_collection_sp = std::make_shared(GetSettingName()); - m_collection_sp->Initialize(g_objectfilepecoff_properties); + m_collection_sp->Initialize(g_objectfilepecoff_properties_def); } llvm::Triple::EnvironmentType ABI() const { -- cgit v1.2.3