Skip to content

Commit

Permalink
fix #9 stacktrace works if triggered by a signal, eg SIGSEGV
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 14, 2021
1 parent 40be351 commit 74bc7a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libbacktrace_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 74bc7a4

Please sign in to comment.