test_common is force-included into every compilation, which causes problems when we're compiling assembly code, as we were in #138805. This avoids that as we can include the header only when it's needed.
22 lines
417 B
C++
22 lines
417 B
C++
#include "attach.h"
|
|
#include <chrono>
|
|
#include <cstdio>
|
|
#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");
|
|
}
|