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

ruby-changes:48293

From: nobu <ko1@a...>
Date: Wed, 25 Oct 2017 08:20:02 +0900 (JST)
Subject: [ruby-changes:48293] nobu:r60407 (trunk): debug.c: imemo_mask

nobu	2017-10-25 08:19:57 +0900 (Wed, 25 Oct 2017)

  New Revision: 60407

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

  Log:
    debug.c: imemo_mask
    
    * .gdbinit (rp, rp_imemo, rb_ps_thread): update imemo_mask.
    
    * debug.c (ruby_dummy_gdb_enums): include imemo_types.

  Modified files:
    trunk/.gdbinit
    trunk/debug.c
Index: debug.c
===================================================================
--- debug.c	(revision 60406)
+++ debug.c	(revision 60407)
@@ -57,6 +57,8 @@ const union { https://github.com/ruby/ruby/blob/trunk/debug.c#L57
         RUBY_NODE_LSHIFT    = NODE_LSHIFT,
         RUBY_NODE_FL_NEWLINE   = NODE_FL_NEWLINE
     } various;
+    enum imemo_type             imemo_types;
+    enum {RUBY_IMEMO_MASK = IMEMO_MASK} imemo_mask;
 } ruby_dummy_gdb_enums;
 
 const SIGNED_VALUE RUBY_NODE_LMASK = NODE_LMASK;
Index: .gdbinit
===================================================================
--- .gdbinit	(revision 60406)
+++ .gdbinit	(revision 60407)
@@ -245,7 +245,7 @@ define rp https://github.com/ruby/ruby/blob/trunk/.gdbinit#L245
   else
   if ($flags & RUBY_T_MASK) == RUBY_T_IMEMO
     printf "%sT_IMEMO%s(", $color_type, $color_end
-    output (enum imemo_type)(($flags>>RUBY_FL_USHIFT)&imemo_mask)
+    output (enum imemo_type)(($flags>>RUBY_FL_USHIFT)&RUBY_IMEMO_MASK)
     printf "): "
     rp_imemo $arg0
   else
@@ -546,7 +546,7 @@ document rp_class https://github.com/ruby/ruby/blob/trunk/.gdbinit#L546
 end
 
 define rp_imemo
-  set $flags = (enum imemo_type)((((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask)
+  set $flags = (enum imemo_type)((((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & RUBY_IMEMO_MASK)
   if $flags == imemo_cref
     printf "(rb_cref_t *) %p\n", (void*)$arg0
     print *(rb_cref_t *)$arg0
@@ -1123,7 +1123,7 @@ define rb_ps_thread https://github.com/ruby/ruby/blob/trunk/.gdbinit#L1123
   set $cfpend = (rb_control_frame_t *)($ps_thread_th->ec.vm_stack + $ps_thread_th->ec.vm_stack_size)-1
   while $cfp < $cfpend
     if $cfp->iseq
-      if !((VALUE)$cfp->iseq & RUBY_IMMEDIATE_MASK) && (((imemo_ifunc << RUBY_FL_USHIFT) | RUBY_T_IMEMO)==$cfp->iseq->flags & ((imemo_mask << RUBY_FL_USHIFT) | RUBY_T_MASK))
+      if !((VALUE)$cfp->iseq & RUBY_IMMEDIATE_MASK) && (((imemo_ifunc << RUBY_FL_USHIFT) | RUBY_T_IMEMO)==$cfp->iseq->flags & ((RUBY_IMEMO_MASK << RUBY_FL_USHIFT) | RUBY_T_MASK))
         printf "%d:ifunc ", $cfpend-$cfp
         set print symbol-filename on
         output/a $cfp->iseq.body

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

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