From 74bc7a4c71b66ca1a06962c206bfe07d7b32a1fa Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 13 Mar 2021 23:37:41 -0800 Subject: [PATCH] fix #9 stacktrace works if triggered by a signal, eg SIGSEGV --- libbacktrace_wrapper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libbacktrace_wrapper.c b/libbacktrace_wrapper.c index 3f5c3f1..c0089d5 100644 --- a/libbacktrace_wrapper.c +++ b/libbacktrace_wrapper.c @@ -162,10 +162,8 @@ static int success_callback(void *data, uintptr_t pc __attribute__((unused)), if (cb_data->next_index == 0) fprintf(stderr, "libbacktrace error: no debugging symbols available. Compile with '--debugger:native'.\n"); - if (debug) - return 0; // Keep going. - else - return 1; // Stop bulding the backtrace. + // see https://github.com/status-im/nim-libbacktrace/issues/9, we need to keep going here. + return 0; } char *demangled_function = demangle(function);