Move the generate backtrace call from MSGB_ABORT to osmo_panic handler
[osmocom-bb.git] / src / panic.c
index 0c0a920..5fb7b56 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include <osmocore/gsm_utils.h>
 #include <osmocore/panic.h>
 
 #include "../config.h"
@@ -36,6 +37,7 @@ static osmo_panic_handler_t osmo_panic_handler = (void*)0;
 static void osmo_panic_default(const char *fmt, va_list args)
 {
        vfprintf(stderr, fmt, args);
+       generate_backtrace();
        abort();
 }