From 7f6615a37df0dadbe86fdfc980e0a8a15013a80e Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Sat, 13 Nov 2010 22:47:47 +0100 Subject: Move the generate backtrace call from MSGB_ABORT to osmo_panic handler This has two benefits: - All people calling osmo_panic() will have the backtrace - It makes the thing build in 'target' mode in osmocom-bb And one downside: - The osmo_panic handler is now in the backtrace (I can live with that :) Signed-off-by: Sylvain Munaut --- src/panic.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/panic.c') diff --git a/src/panic.c b/src/panic.c index 0c0a9204..5fb7b565 100644 --- a/src/panic.c +++ b/src/panic.c @@ -20,6 +20,7 @@ * */ +#include #include #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(); } -- cgit v1.2.3