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`.
25 lines
1007 B
TableGen
25 lines
1007 B
TableGen
include "../../../../include/lldb/Core/PropertiesBase.td"
|
|
|
|
let Definition = "processgdbremote", Path = "plugin.process.gdb-remote" in {
|
|
def PacketTimeout: Property<"packet-timeout", "UInt64">,
|
|
Global,
|
|
#ifdef LLDB_SANITIZED
|
|
DefaultUnsignedValue<60>,
|
|
#else
|
|
DefaultUnsignedValue<5>,
|
|
#endif
|
|
Desc<"Specify the default packet timeout in seconds.">;
|
|
def TargetDefinitionFile: Property<"target-definition-file", "FileSpec">,
|
|
Global,
|
|
DefaultStringValue<"">,
|
|
Desc<"The file that provides the description for remote target registers.">;
|
|
def UseSVR4: Property<"use-libraries-svr4", "Boolean">,
|
|
Global,
|
|
DefaultTrue,
|
|
Desc<"If true, the libraries-svr4 feature will be used to get a hold of the process's loaded modules. This setting is only effective if lldb was build with xml support.">;
|
|
def UseGPacketForReading: Property<"use-g-packet-for-reading", "Boolean">,
|
|
Global,
|
|
DefaultFalse,
|
|
Desc<"Specify if the server should use 'g' packets to read registers.">;
|
|
}
|