================
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <thread>
+#if !defined(_WIN32)
+#include <unistd.h>
+#endif
+
+static void print_pid() {
+  #if defined(_WIN32)
+    fprintf(stderr, "PID: %d\n", ::GetCurrentProcessId());
----------------
royitaqi wrote:

I copied this snippet from from `TestAppleSimulatorOSType`'s `main.cpp` (see 
[code](https://github.com/llvm/llvm-project/blob/c455f4a32d91436c131a751fc9587d7fa3ded614/lldb/test/API/tools/lldb-server/main.cpp#L45-L51)).

However, it's OS-dependent, and I don't have a Windows machine to verify.

Questions:
1. What header files do I need to include for `::GetCurrentProcessId()`?
2. Does the test run in Windows? If not, maybe I can just remove this `#if`.

https://github.com/llvm/llvm-project/pull/139174
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to