blob: c4b67a52abc9c535524b7eecd8b71d0dbb350965 [file] [log] [blame]
paulfb2d1502003-06-04 09:40:54 +00001#include <zebra.h>
2#include "log.h"
3
4void
5debug_print_trace (int signal)
6{
7 void *array[10];
8 size_t size;
9 char **strings;
10 size_t i;
11
12 size = backtrace (array, 10);
13 strings = backtrace_symbols (array, size);
14
15 printf ("Obtained %zd stack frames.\n", size);
16
17 for (i = 0; i < size; i++)
18 printf ("%s\n", strings[i]);
19
20 free (strings);
21
22 exit(1);
23}