[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

Tamas Berghammer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 19 05:02:34 PDT 2017


tberghammer added inline comments.


================
Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:22
+
+  bool delay = true;
+  std::vector<std::thread> threads;
----------------
You have to make this variable atomic (or add a mutex) to make it work. In the current implementation there is no guarantee that the new threads will ever see the updated value as (in theory) the compiler can optimize away the repeated read.


================
Comment at: unittests/tools/lldb-server/tests/MessageObjects.cpp:54
+
+ProcessInfo::ProcessInfo() {}
+
----------------
(nit): You can use "ProcessInfo() = default;" in the header file (here and in every other empty constructor/destructor)


================
Comment at: unittests/tools/lldb-server/tests/MessageObjects.h:33-42
+  lldb::pid_t pid;
+  lldb::pid_t parent_pid;
+  uint32_t real_uid;
+  uint32_t real_gid;
+  uint32_t effective_uid;
+  uint32_t effective_gid;
+  std::string triple;
----------------
A large part of these variables are never read by anybody. Do we want to keep them around just in case or should we remove them?


https://reviews.llvm.org/D32930





More information about the lldb-commits mailing list