зеркало из https://github.com/github/ruby.git
add a debug function.
* vm_dump.c (rb_vmdebug_stack_dump_all_threads): dump stack dump for all living threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
abbabbf8c8
Коммит
fbc1deca89
12
vm_dump.c
12
vm_dump.c
|
@ -1046,3 +1046,15 @@ rb_vm_bugreport(const void *ctx)
|
|||
#endif /* __FreeBSD__ */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rb_vmdebug_stack_dump_all_threads(void)
|
||||
{
|
||||
rb_vm_t *vm = GET_THREAD()->vm;
|
||||
rb_thread_t *th = NULL;
|
||||
|
||||
list_for_each(&vm->living_threads, th, vmlt_node) {
|
||||
fprintf(stderr, "th: %p, native_id: %lx\n", th, (unsigned long)th->thread_id);
|
||||
rb_vmdebug_stack_dump_raw(th, th->cfp);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче