[Lldb-commits] [PATCH] lldb gdb inspired use of ptrace on arm64

Todd Fiala tfiala at google.com
Tue Aug 19 09:57:26 PDT 2014


Hey Paul,

I have just a few questions that all boil down to checking if we need a guard #ifdef around a particular pattern in the code above.  (See code-inlined comments).

Aside from that, LGTM.

Tested:
Ubuntu 14.04 x86_64, clang-3.5-built lldb, all tests passed.

================
Comment at: source/Plugins/Process/Linux/ProcessMonitor.cpp:583
@@ +582,3 @@
+    ioVec.iov_len = m_buf_size;
+    if (PTRACE(PTRACE_GETREGSET, m_tid, &regset, &ioVec, m_buf_size) < 0)
+        m_result = false;
----------------
Do we need an analog of #ifdef PT_GETREGS (as the x86 side has) here?

================
Comment at: source/Plugins/Process/Linux/ProcessMonitor.cpp:629
@@ +628,3 @@
+    ioVec.iov_len = m_buf_size;
+    if (PTRACE(PTRACE_GETREGSET, m_tid, &regset, &ioVec, m_buf_size) < 0)
+        m_result = false;
----------------
The x86 code is guarded by a #ifdef PT_GETFPREGS.  Do we have/need an analog for that here?

================
Comment at: source/Plugins/Process/Linux/ProcessMonitor.cpp:704
@@ +703,3 @@
+    ioVec.iov_len = m_buf_size;
+    if (PTRACE(PTRACE_SETREGSET, m_tid, &regset, &ioVec, m_buf_size) < 0)
+        m_result = false;
----------------
The x86-based call was guarded by an ifdef on the PT_SETREGS define.  Do we need an analog here for PTRACE_SETREGSET?

================
Comment at: source/Plugins/Process/Linux/ProcessMonitor.cpp:750
@@ +749,3 @@
+    ioVec.iov_len = m_buf_size;
+    if (PTRACE(PTRACE_SETREGSET, m_tid, &regset, &ioVec, m_buf_size) < 0)
+        m_result = false;
----------------
Do we need an analog of #ifdef PT_SETFPREGS here?

http://reviews.llvm.org/D4803






More information about the lldb-commits mailing list