Skip to content

Commit

Permalink
Change backtrace prefix of thread ID to 1-based
Browse files Browse the repository at this point in the history
  • Loading branch information
kpamnany committed Sep 29, 2023
1 parent cf32895 commit ad0a3dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stackwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ void jl_print_bt_entry_codeloc(int sig, jl_bt_element_t *bt_entry) JL_NOTSAFEPOI
if (sig != -1) {
snprintf(sig_str, 32, "signal (%d) ", sig);
}
snprintf(pre_str, 64, "%sthread (%d) ", sig_str, jl_threadid());
snprintf(pre_str, 64, "%sthread (%d) ", sig_str, jl_threadid() + 1);

if (jl_bt_is_native(bt_entry)) {
jl_print_native_codeloc(pre_str, bt_entry[0].uintptr);
Expand Down Expand Up @@ -1118,7 +1118,7 @@ static void jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
JL_DLLEXPORT void jl_gdblookup(void* ip)
{
char pre_str[64];
snprintf(pre_str, 64, "thread (%d) ", jl_threadid());
snprintf(pre_str, 64, "thread (%d) ", jl_threadid() + 1);
jl_print_native_codeloc(pre_str, (uintptr_t)ip);
}

Expand Down

0 comments on commit ad0a3dd

Please sign in to comment.