Add watchpoint support for Linux on 64-bit host.
llvm-svn: 181341
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index d893b89..4ebde16 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -47,6 +47,11 @@
#define PTRACE_SETREGSET 0x4205
#endif
+// Support hardware breakpoints in case it has not been defined
+#ifndef TRAP_HWBKPT
+ #define TRAP_HWBKPT 4
+#endif
+
using namespace lldb_private;
// FIXME: this code is host-dependent with respect to types and
@@ -1415,6 +1420,10 @@
case TRAP_BRKPT:
message = ProcessMessage::Break(pid);
break;
+
+ case TRAP_HWBKPT:
+ message = ProcessMessage::Watch(pid, (lldb::addr_t)info->si_addr);
+ break;
}
return message;