[Lldb-commits] [lldb] r202036 - Fix ptrace log on i386 and include return value

Ed Maste emaste at freebsd.org
Mon Feb 24 06:07:45 PST 2014


Author: emaste
Date: Mon Feb 24 08:07:45 2014
New Revision: 202036

URL: http://llvm.org/viewvc/llvm-project?rev=202036&view=rev
Log:
Fix ptrace log on i386 and include return value

Patch by Matthew Gardiner

Modified:
    lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=202036&r1=202035&r2=202036&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Mon Feb 24 08:07:45 2014
@@ -164,10 +164,6 @@ PtraceWrapper(int req, lldb::pid_t pid,
 
     Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PTRACE));
 
-    if (log)
-        log->Printf("ptrace(%s, %lu, %p, %p, %zu) called from file %s line %d",
-                    reqName, pid, addr, data, data_size, file, line);
-
     PtraceDisplayBytes(req, data, data_size);
 
     errno = 0;
@@ -176,6 +172,10 @@ PtraceWrapper(int req, lldb::pid_t pid,
     else
         result = ptrace(static_cast<__ptrace_request>(req), pid, addr, data);
 
+    if (log)
+        log->Printf("ptrace(%s, %" PRIu64 ", %p, %p, %zu)=%lX called from file %s line %d",
+                    reqName, pid, addr, data, data_size, result, file, line);
+
     PtraceDisplayBytes(req, data, data_size);
 
     if (log && errno != 0)





More information about the lldb-commits mailing list