bolt/deps/llvm-18.1.8/lldb/test/API/functionalities/signal/handle-abrt/main.c

26 lines
329 B
C
Raw Normal View History

2025-02-14 19:21:04 +01:00
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
void handler(int sig)
{
printf("Set a breakpoint here.\n");
exit(0);
}
void abort_caller() {
abort();
}
int main()
{
if (signal(SIGABRT, handler) == SIG_ERR)
{
perror("signal");
return 1;
}
abort_caller();
return 2;
}