David Spickett 1446e3cf76 Revert "Fix a bug with cancelling "attach -w" after you have run a process previously (#65822)"
This reverts commit 7265f792dc8e1157a3874aee5f8aed6d4d8236e7.

The new test case is flaky on Linux AArch64 (https://lab.llvm.org/buildbot/#/builders/96)
and more flaky on Windows on Arm (https://lab.llvm.org/buildbot/#/builders/219/builds/5735).
2023-09-20 08:19:53 +00:00

22 lines
399 B
C++

#include <stdio.h>
#include <chrono>
#include <thread>
volatile int g_val = 12345;
int main(int argc, char const *argv[]) {
int temp;
lldb_enable_attach();
// Waiting to be attached by the debugger.
temp = 0;
while (temp < 30) {
std::this_thread::sleep_for(std::chrono::seconds(2)); // Waiting to be attached...
temp++;
}
printf("Exiting now\n");
}