Files
clang-p2996/lldb/test/API/commands/process/attach/main.cpp
2021-07-29 16:23:13 -07: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");
}