X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/39bd025c295974986331ca4cd89ce18cfa50204a..2fd7c9efdedd81cfa2909ebbcdb30eb9b58d7094:/src/debug.c diff --git a/src/debug.c b/src/debug.c index 2df913b0..e7b3ba40 100644 --- a/src/debug.c +++ b/src/debug.c @@ -559,10 +559,11 @@ void logRegisters(ucontext_t *uc) { } /* Logs the stack trace using the backtrace() call. */ -void logStackTrace(ucontext_t *uc) { +sds getStackTrace(ucontext_t *uc) { void *trace[100]; int i, trace_size = 0; char **messages = NULL; + sds st = sdsempty(); /* Generate the stack trace */ trace_size = backtrace(trace, 100); @@ -572,9 +573,12 @@ void logStackTrace(ucontext_t *uc) { trace[1] = getMcontextEip(uc); } messages = backtrace_symbols(trace, trace_size); - redisLog(REDIS_WARNING, "--- STACK TRACE"); - for (i=1; i