[Lldb-commits] [PATCH] [NativeProcessLinux] Use lambdas in DoOperation calls
Pavel Labath
labath at google.com
Thu Jun 25 01:57:06 PDT 2015
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3171
@@ +3170,3 @@
+
+ intptr_t data = 0;
+
----------------
chaoren wrote:
> chaoren wrote:
> > Why not make this `void *` to begin with?
> Whoops, didn't see the assignment right below. Please ignore this.
This could be made simpler, but I did not want to do it here, as it is just copy-pasted.
================
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;
----------------
chaoren wrote:
> Does it make sense to have PtraceWrapper return Error? To be consistent with some changes you made above.
I've thought about that as well and I think it is a good idea. I propose to do it in a followup patch. I'll need to check if putting the current return value in a by-ref parameter will not make other things more awkward.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3728
@@ -3895,3 +3727,3 @@
Error
-NativeProcessLinux::DoOperation(Operation* op)
+NativeProcessLinux::DoOperation(const Operation & op)
{
----------------
chaoren wrote:
> Nit: extra space.
Done.
================
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);
----------------
chaoren wrote:
> Nit: extra space.
On which side? :)
I'll remove the right one, as that seems to be most consistent with other uses.
http://reviews.llvm.org/D10694
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the lldb-commits
mailing list