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
1.2 KiB
TableGen
15 lines
1.2 KiB
TableGen
include "../../../../include/lldb/Core/PropertiesBase.td"
|
|
|
|
let Definition = "objectfilepecoff", Path = "plugin.object-file.pe-coff" in {
|
|
def ABI: Property<"abi", "Enum">,
|
|
Global,
|
|
DefaultEnumValue<"llvm::Triple::UnknownEnvironment">,
|
|
EnumValues<"OptionEnumValues(g_abi_enums)">,
|
|
Desc<"ABI to use when loading a PE/COFF module. This configures the C++ ABI used, which affects things like the handling of class layout. Accepted values are: `msvc` for the MSVC ABI, `gnu` for the MinGW / Itanium ABI, and `default` to follow the default target if it is a Windows triple or use the MSVC ABI by default.">;
|
|
def ModuleABIMap: Property<"module-abi", "Dictionary">,
|
|
Global,
|
|
ElementType<"Enum">,
|
|
EnumValues<"OptionEnumValues(g_abi_enums)">,
|
|
Desc<"A mapping of ABI override to use for specific modules. The module name is matched by its file name with extension. These versions are checked in sequence: exact, lowercase, exact with '.debug' suffix stripped, lowercase with '.debug' suffix stripped. Accepted values are: `msvc` for the MSVC ABI, `gnu` for the MinGW / Itanium ABI, and `default` to follow the default target if it is a Windows triple or use the MSVC ABI by default.">;
|
|
}
|