diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp b/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp new file mode 100644 index 00000000000..46ffacc0a84 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp @@ -0,0 +1,20 @@ +#include <stdio.h> + +#include <chrono> +#include <thread> + +int main(int argc, char const *argv[]) { + int temp; + lldb_enable_attach(); + + // Waiting to be attached by the debugger. + temp = 0; + + while (temp < 30) // Waiting to be attached... + { + std::this_thread::sleep_for(std::chrono::seconds(2)); + temp++; + } + + printf("Exiting now\n"); +} |