[Lldb-commits] [PATCH] D60496: [lldb-server] Update tests to use std::thread/mutex for all platforms

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 11 14:14:45 PDT 2019


clayborg added inline comments.


================
Comment at: packages/Python/lldbsuite/test/tools/lldb-server/main.cpp:74-78
+#if defined(_WIN32)
+  fprintf(stderr, "PID: %d\n", ::GetCurrentProcessId());
+#else
   fprintf(stderr, "PID: %d\n", getpid());
+#endif
----------------
Is there no llvm host code we can use as the porting layer instead of this?


================
Comment at: packages/Python/lldbsuite/test/tools/lldb-server/main.cpp:81-101
 static void print_thread_id() {
 // Put in the right magic here for your platform to spit out the thread id (tid)
 // that debugserver/lldb-gdbserver would see as a TID. Otherwise, let the else
 // clause print out the unsupported text so that the unit test knows to skip
 // verifying thread ids.
 #if defined(__APPLE__)
   __uint64_t tid = 0;
----------------
No llvm host layer code for this too?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60496/new/

https://reviews.llvm.org/D60496





More information about the lldb-commits mailing list