[Lldb-commits] [lldb] 0bbe2a3 - [lldb] More missing includes in TestGdbRemote_vContThreads

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 30 09:07:30 PDT 2021


Author: Pavel Labath
Date: 2021-03-30T18:05:31+02:00
New Revision: 0bbe2a3c8aae29445b73423bd54baa72e515484d

URL: https://github.com/llvm/llvm-project/commit/0bbe2a3c8aae29445b73423bd54baa72e515484d
DIFF: https://github.com/llvm/llvm-project/commit/0bbe2a3c8aae29445b73423bd54baa72e515484d.diff

LOG: [lldb] More missing includes in TestGdbRemote_vContThreads

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-server/vCont-threads/main.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-server/vCont-threads/main.cpp b/lldb/test/API/tools/lldb-server/vCont-threads/main.cpp
index dc1fd7ef3f28..f70be42af1a9 100644
--- a/lldb/test/API/tools/lldb-server/vCont-threads/main.cpp
+++ b/lldb/test/API/tools/lldb-server/vCont-threads/main.cpp
@@ -3,6 +3,7 @@
 #include <chrono>
 #include <cinttypes>
 #include <csignal>
+#include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <thread>
@@ -13,8 +14,9 @@ pseudo_barrier_t barrier;
 
 static void sigusr1_handler(int signo) {
   char buf[100];
-  snprintf(buf, sizeof(buf), "received SIGUSR1 on thread id: %" PRIx64 "\n",
-           get_thread_id());
+  std::snprintf(buf, sizeof(buf),
+                "received SIGUSR1 on thread id: %" PRIx64 "\n",
+                get_thread_id());
   write(STDOUT_FILENO, buf, strlen(buf));
 }
 
@@ -36,7 +38,7 @@ int main(int argc, char **argv) {
 
   pseudo_barrier_wait(barrier);
 
-  puts("@started");
+  std::puts("@started");
 
   for (std::thread &thread : threads)
     thread.join();


        


More information about the lldb-commits mailing list