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

ruby-changes:45354

From: ko1 <ko1@a...>
Date: Thu, 26 Jan 2017 18:57:47 +0900 (JST)
Subject: [ruby-changes:45354] ko1:r57427 (trunk): skip T_IMEMO for VMDEBUG

ko1	2017-01-26 18:57:41 +0900 (Thu, 26 Jan 2017)

  New Revision: 57427

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

  Log:
    skip T_IMEMO for VMDEBUG
    
    * vm_dump.c (vm_stack_dump_each): skip T_IMEMO object to display
      for VMDEBUG=3. [Bug #13030]

  Modified files:
    trunk/vm_dump.c
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 57426)
+++ vm_dump.c	(revision 57427)
@@ -281,11 +281,16 @@ vm_stack_dump_each(rb_thread_t *th, rb_c https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L281
 
 	ptr = vm_base_ptr(cfp);
 	for (; ptr < sp; ptr++, i++) {
-	    if (*ptr == Qundef) {
+	    switch (TYPE(*ptr)) {
+	      case T_UNDEF:
 		rstr = rb_str_new2("undef");
-	    }
-	    else {
+		break;
+	      case T_IMEMO:
+		rstr = rb_str_new2("imemo"); /* TODO: can put mode detail information */
+		break;
+	      default:
 		rstr = rb_inspect(*ptr);
+		break;
 	    }
 	    fprintf(stderr, "  stack %2d: %8s (%"PRIdPTRDIFF")\n", i, StringValueCStr(rstr),
 		    (ptr - th->stack));

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

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