[Lldb-commits] [PATCH] D11150: [NativeProcessLinux] Integrate MainLoop
Oleksiy Vyalov
ovyalov at google.com
Mon Jul 13 18:13:40 PDT 2015
ovyalov added inline comments.
================
Comment at: include/lldb/Host/common/NativeProcessProtocol.h:19
@@ -18,2 +18,3 @@
#include "lldb/Host/Mutex.h"
+#include "lldb/Host/MainLoop.h"
#include "llvm/ADT/StringRef.h"
----------------
Can you use forward declaration here?
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3302
@@ +3301,3 @@
+ if (log)
+ log->Printf("NativeProcessLinux::%s waitpid (-1, &status, __WALL | __WNOTHREAD | WNOHANG) failed: %s",
+ __FUNCTION__, strerror(errno));
----------------
indentation.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3303
@@ +3302,3 @@
+ log->Printf("NativeProcessLinux::%s waitpid (-1, &status, __WALL | __WNOTHREAD | WNOHANG) failed: %s",
+ __FUNCTION__, strerror(errno));
+ break;
----------------
Please consider storing errno as a local variable before logging - if log->Printf will be failing by any reason we don't want it to overwrite errno.
================
Comment at: source/Plugins/Process/Linux/NativeProcessLinux.cpp:3310
@@ +3309,3 @@
+ int exit_status = 0;
+ const char *status_cstr = NULL;
+ if (WIFSTOPPED(status))
----------------
s/NULL/nullptr
================
Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:102
@@ -101,3 +101,3 @@
//----------------------------------------------------------------------
GDBRemoteCommunicationServerLLGS::~GDBRemoteCommunicationServerLLGS()
{
----------------
Since you're removing Terminate method from it's seems feasible to remove this destructor impl as well.
http://reviews.llvm.org/D11150
More information about the lldb-commits
mailing list