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

ruby-changes:41709

From: nobu <ko1@a...>
Date: Tue, 9 Feb 2016 11:09:18 +0900 (JST)
Subject: [ruby-changes:41709] nobu:r53783 (trunk): .gdbinit: improve rb_imemo [ci skip]

nobu	2016-02-09 11:09:24 +0900 (Tue, 09 Feb 2016)

  New Revision: 53783

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

  Log:
    .gdbinit: improve rb_imemo [ci skip]
    
    * .gdbinit (rp_imemo): support imemo_ment and imemo_iseq.

  Modified files:
    trunk/.gdbinit
Index: .gdbinit
===================================================================
--- .gdbinit	(revision 53782)
+++ .gdbinit	(revision 53783)
@@ -468,7 +468,7 @@ document rp_class https://github.com/ruby/ruby/blob/trunk/.gdbinit#L468
 end
 
 define rp_imemo
-  set $flags = (((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask
+  set $flags = (enum imemo_type)((((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask)
   if $flags == imemo_cref
     printf "(rb_cref_t *) %p\n", (void*)$arg0
     print *(rb_cref_t *)$arg0
@@ -489,11 +489,21 @@ define rp_imemo https://github.com/ruby/ruby/blob/trunk/.gdbinit#L489
     printf "(struct MEMO *) %p\n", (void*)$arg0
     print *(struct MEMO *)$arg0
   else
+  if $flags == imemo_ment
+    printf "(rb_method_entry_t *) %p\n", (void*)$arg0
+    print *(rb_method_entry_t *)$arg0
+  else
+  if $flags == imemo_iseq
+    printf "(rb_iseq_t *) %p\n", (void*)$arg0
+    print *(rb_iseq_t *)$arg0
+  else
     printf "(struct RIMemo *) %p\n", (void*)$arg0
     print *(struct RIMemo *)$arg0
   end
   end
   end
+  end
+  end
   end
   end
 end

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

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