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`.
15 lines
842 B
TableGen
15 lines
842 B
TableGen
include "../../../../include/lldb/Core/PropertiesBase.td"
|
|
|
|
let Definition = "symbolfilepdb", Path = "plugin.symbol-file.pdb" in {
|
|
def Reader: Property<"reader", "Enum">,
|
|
Global,
|
|
DefaultEnumValue<"ePDBReaderDefault">,
|
|
EnumValues<"OptionEnumValues(g_pdb_reader_enums)">,
|
|
Desc<"Selects the reader for PDB symbol files. "
|
|
"The native PDB reader that uses LLVM's PDB support is always available (value: 'native'). "
|
|
"Secondly, the DIA PDB reader is only available if LLVM was compiled with Microsoft's DIA SDK on Windows (value: 'DIA'). "
|
|
"By default, the DIA PDB reader is used if available. "
|
|
"The LLDB_USE_NATIVE_PDB_READER environment variable can be used to switch to the native reader when this setting has the default value. "
|
|
"Otherwise, the setting always has priority.">;
|
|
}
|