[前][次][番号順一覧][スレッド一覧]

ruby-changes:46295

From: ko1 <ko1@a...>
Date: Thu, 20 Apr 2017 13:50:58 +0900 (JST)
Subject: [ruby-changes:46295] ko1:r58408 (trunk): add a debug function.

ko1	2017-04-20 13:50:53 +0900 (Thu, 20 Apr 2017)

  New Revision: 58408

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58408

  Log:
    add a debug function.
    
    * vm_dump.c (rb_vmdebug_stack_dump_all_threads): dump stack dump
      for all living threads.

  Modified files:
    trunk/vm_dump.c
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 58407)
+++ vm_dump.c	(revision 58408)
@@ -1046,3 +1046,15 @@ rb_vm_bugreport(const void *ctx) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L1046
 #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);
+    }
+}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]