[Lldb-commits] [PATCH] [NativeProcessLinux] Use lambdas in DoOperation calls

Chaoren Lin chaorenl at google.com
Wed Jun 24 11:29:10 PDT 2015


================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3171
@@ +3170,3 @@
+
+    intptr_t data = 0;
+
----------------
Why not make this `void *` to begin with?

================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3178
@@ +3177,3 @@
+        Error error;
+        NativeProcessLinux::PtraceWrapper(PTRACE_CONT, tid, nullptr, (void*)data, 0, error);
+        return error;
----------------
Does it make sense to have PtraceWrapper return Error? To be consistent with some changes you made above.

================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3190
@@ -3370,4 +3189,3 @@
 {
-    SingleStepOperation op(tid, signo);
-    m_monitor_up->DoOperation(&op);
-    return op.GetError();
+    intptr_t data = 0;
+
----------------
`void *`?

================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3728
@@ -3895,3 +3727,3 @@
 Error
-NativeProcessLinux::DoOperation(Operation* op)
+NativeProcessLinux::DoOperation(const Operation & op)
 {
----------------
Nit: extra space.

================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.h:142
@@ -161,6 +141,3 @@
         Error
-        DoOperation(Operation* op);
-
-        Error
-        DoOperation(OperationUP op) { return DoOperation(op.get()); }
+        DoOperation(const Operation & op);
 
----------------
Nit: extra space.

http://reviews.llvm.org/D10694

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list