ruby-changes:45103
From: nobu <ko1@a...>
Date: Sun, 25 Dec 2016 14:58:31 +0900 (JST)
Subject: [ruby-changes:45103] nobu:r57176 (trunk): .gdbinit: refine rp
nobu 2016-12-25 14:58:24 +0900 (Sun, 25 Dec 2016) New Revision: 57176 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57176 Log: .gdbinit: refine rp * .gdbinit (rp): refine output of T_STRUCT and T_BIGNUM to show all elements. Modified files: trunk/.gdbinit Index: .gdbinit =================================================================== --- .gdbinit (revision 57175) +++ .gdbinit (revision 57176) @@ -157,28 +157,29 @@ define rp https://github.com/ruby/ruby/blob/trunk/.gdbinit#L157 print (struct RHash *)($arg0) else if ($flags & RUBY_T_MASK) == RUBY_T_STRUCT - printf "%sT_STRUCT%s: len=%ld ", $color_type, $color_end, \ - (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ + set $len = (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ ($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) >> (RUBY_FL_USHIFT+1) : \ ((struct RStruct *)($arg0))->as.heap.len) + printf "%sT_STRUCT%s: len=%ld ", $color_type, $color_end, $len print (struct RStruct *)($arg0) - x/xw (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ - ((struct RStruct *)($arg0))->as.ary : \ - ((struct RStruct *)($arg0))->as.heap.ptr) + output/x *(($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \ + ((struct RStruct *)($arg0))->as.ary : \ + ((struct RStruct *)($arg0))->as.heap.ptr) @ $len else if ($flags & RUBY_T_MASK) == RUBY_T_BIGNUM - printf "%sT_BIGNUM%s: sign=%d len=%ld ", $color_type, $color_end, \ - (($flags & RUBY_FL_USER1) != 0), \ - (($flags & RUBY_FL_USER2) ? \ + set $len = (($flags & RUBY_FL_USER2) ? \ ($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \ ((struct RBignum*)($arg0))->as.heap.len) + printf "%sT_BIGNUM%s: sign=%d len=%ld ", $color_type, $color_end, \ + (($flags & RUBY_FL_USER1) != 0), $len if $flags & RUBY_FL_USER2 printf "(embed) " end print (struct RBignum *)($arg0) - x/xw (($flags & RUBY_FL_USER2) ? \ - ((struct RBignum*)($arg0))->as.ary : \ - ((struct RBignum*)($arg0))->as.heap.digits) + output/x *(($flags & RUBY_FL_USER2) ? \ + ((struct RBignum*)($arg0))->as.ary : \ + ((struct RBignum*)($arg0))->as.heap.digits) @ $len + printf "\n" else if ($flags & RUBY_T_MASK) == RUBY_T_RATIONAL printf "%sT_RATIONAL%s: ", $color_type, $color_end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/