Author: stella.stamenova
Date: Thu May  9 12:49:26 2019
New Revision: 360371

URL: http://llvm.org/viewvc/llvm-project?rev=360371&view=rev
Log:
Fix TestVSCode_attach on Linux

The test is failing sometimes because the debugger is failing to attach for 
lack of permissions. The fix is to call lldb_enable_attach inside the inferior 
main function

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c?rev=360371&r1=360370&r2=360371&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c 
Thu May  9 12:49:26 2019
@@ -1,8 +1,11 @@
 #include <stdio.h>
 #include <unistd.h>
 
-int main(int argc, char const *argv[]) {
-  printf("pid = %i\n", getpid());
-  sleep(10);
-  return 0; // breakpoint 1
+int main(int argc, char const *argv[])
+{
+    lldb_enable_attach();
+
+    printf("pid = %i\n", getpid());
+    sleep(10);
+    return 0; // breakpoint 1
 }


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to