diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-25 05:58:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-25 05:58:24 +0000 |
commit | 49f38abe5ed0f63d193f211a6bd1f37f6168b0ed (patch) | |
tree | de4e559d26b521fd4df653cd94c297be915ef101 | |
parent | c56182a0b0852cf1fc2c13a9955a42693e0c97a4 (diff) |
.gdbinit: refine rp
* .gdbinit (rp): refine output of T_STRUCT and T_BIGNUM to show
all elements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | .gdbinit | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -157,28 +157,29 @@ define rp 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 |