From e9a79beef3cd891ac16bae05a28c91c613df6442 Mon Sep 17 00:00:00 2001 From: Imran Zaman Date: Mon, 24 Jun 2013 16:46:39 +0300 Subject: Release 0.0.1 --- include/gsignond/gsignond-log.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') diff --git a/include/gsignond/gsignond-log.h b/include/gsignond/gsignond-log.h index 88c1452..f1bac1f 100644 --- a/include/gsignond/gsignond-log.h +++ b/include/gsignond/gsignond-log.h @@ -27,6 +27,25 @@ #include +#include +#include +#include + +#define TRACEBACK() \ +{ \ + void *array[256];\ + size_t size, i;\ + char **strings;\ +\ + fprintf (stderr, "Backtrace for: %s %s\n", __FILE__, __PRETTY_FUNCTION__); \ + size = backtrace (array, 256);\ + strings = backtrace_symbols (array, size);\ + if (strings) { \ + for (i=0; i