diff options
author | Nicolas Viennot <nicolas@viennot.biz> | 2013-07-29 09:50:42 -0400 |
---|---|---|
committer | Nicolas Viennot <nicolas@viennot.biz> | 2013-07-29 09:51:37 -0400 |
commit | 089a594a68c95e1cbad62700fd50ce7ef9d63996 (patch) | |
tree | eee997d7192aaa2cd3bcc1aa65593629ab4e7552 | |
parent | 13d3439933410669c21916ac60977719ea469a11 (diff) |
Better stack traces
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | tmate-debug.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 2268de88..78916ecc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ endif CFLAGS += -Wno-unused-parameter -Wno-unused-variable CFLAGS += -Ilibssh/include/ -Imsgpack/src +CFLAGS += -rdynamic # for stack traces if IS_DEVENV CFLAGS += -DDEVENV diff --git a/tmate-debug.c b/tmate-debug.c index 15dd31a6..9e160c43 100644 --- a/tmate-debug.c +++ b/tmate-debug.c @@ -62,13 +62,13 @@ void tmate_print_trace(void) size = backtrace (array, 20); strings = backtrace_symbols (array, size); - tmate_debug ("============ %zd stack frames ============", size); + tmate_info ("============ %zd stack frames ============", size); for (i = 1; i < size; i++) { #if DEBUG if (print_resolved_stack_frame(strings[i]) < 0) #endif - tmate_debug("%s", strings[i]); + tmate_info("%s", strings[i]); } free (strings); |