diff options
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader')
3 files changed, 33 insertions, 8 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt index ffc797b7475..b4ba84a7fde 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt @@ -1,3 +1,11 @@ +lldb_tablegen(Properties.inc -gen-lldb-property-defs + SOURCE Properties.td + TARGET LLDBPluginDynamicLoaderDarwinKernelPropertiesGen) + +lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs + SOURCE Properties.td + TARGET LLDBPluginDynamicLoaderDarwinKernelPropertiesEnumGen) + add_lldb_library(lldbPluginDynamicLoaderDarwinKernel PLUGIN DynamicLoaderDarwinKernel.cpp @@ -11,3 +19,7 @@ add_lldb_library(lldbPluginDynamicLoaderDarwinKernel PLUGIN lldbUtility lldbPluginPlatformMacOSX ) + +add_dependencies(lldbPluginDynamicLoaderDarwinKernel + LLDBPluginDynamicLoaderDarwinKernelPropertiesGen + LLDBPluginDynamicLoaderDarwinKernelPropertiesEnumGen) diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 7ff783da346..0d55e341dae 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -73,14 +73,14 @@ static constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values[] = { "on 32-bit targets)."}}; static constexpr PropertyDefinition g_properties[] = { - {"load-kexts", OptionValue::eTypeBoolean, true, true, nullptr, {}, - "Automatically loads kext images when attaching to a kernel."}, - {"scan-type", OptionValue::eTypeEnum, true, eKASLRScanNearPC, nullptr, - OptionEnumValues(g_kaslr_kernel_scan_enum_values), - "Control how many reads lldb will make while searching for a Darwin " - "kernel on attach."}}; - -enum { ePropertyLoadKexts, ePropertyScanType }; +#define LLDB_PROPERTIES_dynamicloaderdarwinkernel +#include "Properties.inc" +}; + +enum { +#define LLDB_PROPERTIES_dynamicloaderdarwinkernel +#include "PropertiesEnum.inc" +}; class DynamicLoaderDarwinKernelProperties : public Properties { public: diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/Properties.td b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/Properties.td new file mode 100644 index 00000000000..6c662d737fa --- /dev/null +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/Properties.td @@ -0,0 +1,13 @@ +include "../../../../include/lldb/Core/PropertiesBase.td" + +let Definition = "dynamicloaderdarwinkernel" in { + def LoadKexts: Property<"load-kexts", "Boolean">, + Global, + DefaultTrue, + Desc<"Automatically loads kext images when attaching to a kernel.">; + def ScanType: Property<"scan-type", "Enum">, + Global, + DefaultEnumValue<"eKASLRScanNearPC">, + EnumValues<"OptionEnumValues(g_kaslr_kernel_scan_enum_values)">, + Desc<"Control how many reads lldb will make while searching for a Darwin kernel on attach.">; +} |

