I've written a macOS launch daemon in C++ (that runs on Apple M2 chip, which I believe uses the ARM64 architecture.) I noticed in the log that once in a while my daemon causes the SIGABRT with calling pid of my own process:
SIGNAL: SIGABRT, sig_info=0x16bbea7c0 > {si_signo=6, si_errno=0, si_code=0, si_pid=3320:"MyDaemon", si_uid=0, si_status=6, si_addr=0x18b0ab224, si_value=0x0, si_band=0}
The handler for the signal allows me to retrieve the context of the signal:
void signalCallback(int sig, siginfo_t *info, void *context)
{
}
The question is how do I retrieve the faulty operation that caused SIGABRT?
Or better yet, a callstack?