Skip to content

Commit 1dd5dbf

Browse files
committed
Change backtrace prefix of thread ID to 1-based
1 parent 0edbb4d commit 1dd5dbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stackwalk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ void jl_print_bt_entry_codeloc(int sig, jl_bt_element_t *bt_entry) JL_NOTSAFEPOI
662662
if (sig != -1) {
663663
snprintf(sig_str, 32, "signal (%d) ", sig);
664664
}
665-
snprintf(pre_str, 64, "%sthread (%d) ", sig_str, jl_threadid());
665+
snprintf(pre_str, 64, "%sthread (%d) ", sig_str, jl_threadid() + 1);
666666

667667
if (jl_bt_is_native(bt_entry)) {
668668
jl_print_native_codeloc(pre_str, bt_entry[0].uintptr);
@@ -1118,7 +1118,7 @@ static void jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
11181118
JL_DLLEXPORT void jl_gdblookup(void* ip)
11191119
{
11201120
char pre_str[64];
1121-
snprintf(pre_str, 64, "thread (%d) ", jl_threadid());
1121+
snprintf(pre_str, 64, "thread (%d) ", jl_threadid() + 1);
11221122
jl_print_native_codeloc(pre_str, (uintptr_t)ip);
11231123
}
11241124

0 commit comments

Comments
 (0)