3 add a useful tool to test the gdb_backtrace script
6 cc -g -o gdb_backtrace_test gdb_backtrace_test.c
8 and run it in the same directory where your gdb_backtrace script is.
10 2006 - Stefan Metzmacher <metze@samba.org>
19 static const char *prog
;
21 static void sig_fault(int sig
)
26 snprintf(cmdstr
, sizeof(cmdstr
),
27 "./gdb_backtrace %u %s",
29 printf("sig_fault start: %s\n", cmdstr
);
31 printf("sig_fault end: %d\n", ret
);
34 int main(int argc
, const char **argv
)
38 signal(SIGABRT
, sig_fault
);