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

Pavel Labath labath at google.com
Thu Jun 25 05:25:25 PDT 2015


================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:259
@@ -258,3 +258,3 @@
                     ProcessPOSIXLog::DecNestLevel();
-                return bytes_read;
+                return error;
             }
----------------
tberghammer wrote:
> (nit): You can do a "return Error();" here
I don't think so. PtraceWrapper sets the error variable, and I need to test it. right?

================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:713
@@ -901,3 +712,3 @@
         case operation_command:
-            m_operation->Execute(m_native_process);
+            m_operation_error = (*m_operation)();
             break;
----------------
tberghammer wrote:
> (nit): I think "m_operation->operator()();" is cleaner but it is up to you
I don't find either of the options particularly appealing, but I prefer this one a bit.

http://reviews.llvm.org/D10694

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






More information about the lldb-commits mailing list