core: Add some generic panic handling

This also includes an option for a minimal 'infinite loop' type
panic that could be required for embedded target that don't have
abort() or fprintf()

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/src/Makefile.am b/src/Makefile.am
index a20fbc8..e197e17 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,7 @@
 			 tlv_parser.c bitvec.c comp128.c gsm_utils.c statistics.c \
 			 write_queue.c utils.c rsl.c gsm48.c gsm48_ie.c \
 			 logging.c gsm0808.c rate_ctr.c gsmtap_util.c \
-			 gprs_cipher_core.c crc16.c
+			 gprs_cipher_core.c crc16.c panic.c
 
 if ENABLE_PLUGIN
 libosmocore_la_SOURCES += plugin.c