summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt12
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp12
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/Properties.td8
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt12
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp38
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/Properties.td16
6 files changed, 62 insertions, 36 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt b/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
index bed0e3b7ab3..56720083631 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(Properties.inc -gen-lldb-property-defs
+ SOURCE Properties.td
+ TARGET LLDBPluginProcessMacOSXKernelPropertiesGen)
+
+lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs
+ SOURCE Properties.td
+ TARGET LLDBPluginProcessMacOSXKernelPropertiesEnumGen)
+
add_lldb_library(lldbPluginProcessMacOSXKernel PLUGIN
CommunicationKDP.cpp
ProcessKDP.cpp
@@ -20,3 +28,7 @@ add_lldb_library(lldbPluginProcessMacOSXKernel PLUGIN
lldbPluginDynamicLoaderStatic
lldbPluginProcessUtility
)
+
+add_dependencies(lldbPluginProcessMacOSXKernel
+ LLDBPluginProcessMacOSXKernelPropertiesGen
+ LLDBPluginProcessMacOSXKernelPropertiesEnumGen)
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 52c494db6be..5542018a4f9 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -53,10 +53,14 @@ using namespace lldb_private;
namespace {
static constexpr PropertyDefinition g_properties[] = {
- {"packet-timeout", OptionValue::eTypeUInt64, true, 5, NULL, {},
- "Specify the default packet timeout in seconds."}};
+#define LLDB_PROPERTIES_processkdp
+#include "Properties.inc"
+};
-enum { ePropertyPacketTimeout };
+enum {
+#define LLDB_PROPERTIES_processkdp
+#include "PropertiesEnum.inc"
+};
class PluginProperties : public Properties {
public:
@@ -72,7 +76,7 @@ public:
virtual ~PluginProperties() {}
uint64_t GetPacketTimeout() {
- const uint32_t idx = ePropertyPacketTimeout;
+ const uint32_t idx = ePropertyKDPPacketTimeout;
return m_collection_sp->GetPropertyAtIndexAsUInt64(
NULL, idx, g_properties[idx].default_uint_value);
}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/Properties.td b/lldb/source/Plugins/Process/MacOSX-Kernel/Properties.td
new file mode 100644
index 00000000000..0063bdbec00
--- /dev/null
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/Properties.td
@@ -0,0 +1,8 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "processkdp" in {
+ def KDPPacketTimeout: Property<"packet-timeout", "UInt64">,
+ Global,
+ DefaultUnsignedValue<5>,
+ Desc<"Specify the default packet timeout in seconds.">;
+}
diff --git a/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt b/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
index 4eb5291d54d..2e0b4a8041c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(Properties.inc -gen-lldb-property-defs
+ SOURCE Properties.td
+ TARGET LLDBPluginProcessGDBRemotePropertiesGen)
+
+lldb_tablegen(PropertiesEnum.inc -gen-lldb-property-enum-defs
+ SOURCE Properties.td
+ TARGET LLDBPluginProcessGDBRemotePropertiesEnumGen)
+
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
@@ -40,3 +48,7 @@ add_lldb_library(lldbPluginProcessGDBRemote PLUGIN
LINK_COMPONENTS
Support
)
+
+add_dependencies(lldbPluginProcessGDBRemote
+ LLDBPluginProcessGDBRemotePropertiesGen
+ LLDBPluginProcessGDBRemotePropertiesEnumGen)
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 5cb5f147367..ade1d84b16b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -111,39 +111,13 @@ void DumpProcessGDBRemotePacketHistory(void *p, const char *path) {
namespace {
static constexpr PropertyDefinition g_properties[] = {
- {"packet-timeout",
- OptionValue::eTypeUInt64,
- true,
- 5
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
- * 2
-#endif
-#endif
- ,
- nullptr,
- {},
- "Specify the default packet timeout in seconds."},
- {"target-definition-file",
- OptionValue::eTypeFileSpec,
- true,
- 0,
- nullptr,
- {},
- "The file that provides the description for remote target registers."},
- {"use-libraries-svr4",
- OptionValue::eTypeBoolean,
- true,
- false,
- nullptr,
- {},
- "If true, the libraries-svr4 feature will be used to get a hold of the "
- "process's loaded modules."}};
+#define LLDB_PROPERTIES_processgdbremote
+#include "Properties.inc"
+};
enum {
- ePropertyPacketTimeout,
- ePropertyTargetDefinitionFile,
- ePropertyUseSVR4
+#define LLDB_PROPERTIES_processgdbremote
+#include "PropertiesEnum.inc"
};
class PluginProperties : public Properties {
@@ -2469,7 +2443,7 @@ void ProcessGDBRemote::RefreshStateAfterStop() {
// Clear the thread stop stack
m_stop_packet_stack.clear();
}
-
+
// If we have queried for a default thread id
if (m_initial_tid != LLDB_INVALID_THREAD_ID) {
m_thread_list.SetSelectedThreadByID(m_initial_tid);
diff --git a/lldb/source/Plugins/Process/gdb-remote/Properties.td b/lldb/source/Plugins/Process/gdb-remote/Properties.td
new file mode 100644
index 00000000000..16e7723e306
--- /dev/null
+++ b/lldb/source/Plugins/Process/gdb-remote/Properties.td
@@ -0,0 +1,16 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "processgdbremote" in {
+ def PacketTimeout: Property<"packet-timeout", "UInt64">,
+ Global,
+ DefaultUnsignedValue<5>,
+ 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,
+ DefaultFalse,
+ Desc<"If true, the libraries-svr4 feature will be used to get a hold of the process's loaded modules.">;
+}
OpenPOWER on IntegriCloud