diff options
author | Stella Stamenova <stilis@microsoft.com> | 2019-05-09 19:49:26 +0000 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2019-05-09 19:49:26 +0000 |
commit | dde1d9a6b77547e82c7113509934a5672118d653 (patch) | |
tree | 7d15e5f5f4c81a072cd485d2d706441ef600e0bb /lldb/packages/Python | |
parent | d9c6b039dbcf4a38edf62a5491c2b024724e1b5d (diff) | |
download | bcm5719-llvm-dde1d9a6b77547e82c7113509934a5672118d653.tar.gz bcm5719-llvm-dde1d9a6b77547e82c7113509934a5672118d653.zip |
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
llvm-svn: 360371
Diffstat (limited to 'lldb/packages/Python')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c index 123ead2fa65..4f50f754615 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c @@ -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 } |