aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--thread.c5
-rw-r--r--vm_dump.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 972e1b9c6e..f97c8e355b 100644
--- a/thread.c
+++ b/thread.c
@@ -203,8 +203,9 @@ void rb_thread_debug(const char *fmt, ...);
#endif
# ifdef NON_SCALAR_THREAD_ID
-static const char *
-fill_thread_id_string(rb_nativethread_id_t thid, rb_thread_id_string_t buf)
+#define fill_thread_id_string ruby_fill_thread_id_string
+const char *
+ruby_fill_thread_id_string(rb_nativethread_id_t thid, rb_thread_id_string_t buf)
{
extern const char ruby_digitmap[];
size_t i;
diff --git a/vm_dump.c b/vm_dump.c
index 5c56d61652..9d1139ec92 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -1047,6 +1047,10 @@ rb_vm_bugreport(const void *ctx)
}
}
+#ifdef NON_SCALAR_THREAD_ID
+const char *ruby_fill_thread_id_string(rb_nativethread_id_t thid, rb_thread_id_string_t buf);
+#endif
+
void
rb_vmdebug_stack_dump_all_threads(void)
{
@@ -1054,7 +1058,13 @@ rb_vmdebug_stack_dump_all_threads(void)
rb_thread_t *th = NULL;
list_for_each(&vm->living_threads, th, vmlt_node) {
+#ifdef NON_SCALAR_THREAD_ID
+ rb_thread_id_string_t buf;
+ ruby_fill_thread_id_string(th->thread_id, buf);
+ fprintf(stderr, "th: %p, native_id: %s\n", th, buf);
+#else
fprintf(stderr, "th: %p, native_id: %p\n", th, (void *)th->thread_id);
+#endif
rb_vmdebug_stack_dump_raw(th, th->cfp);
}
}