diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-25 02:59:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-25 02:59:47 +0000 |
commit | 982a448ead1e76d1891ff3bd1ddc7e365a0846dc () | |
tree | d353f305a5af494b1e69bf9ea1bfceb02a5a9aae /.gdbinit | |
parent | 15ef28a991f66f65bb29751cf2bef3bcb51066fc (diff) |
.gdbinit: rp_bignum
* .gdbinit (rp_bignum): print bignum from higher digits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | .gdbinit | 59 |
1 files changed, 46 insertions, 13 deletions
@@ -168,19 +168,7 @@ define rp ((struct RStruct *)($arg0))->as.heap.ptr) @ $len else if ($flags & RUBY_T_MASK) == RUBY_T_BIGNUM - 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) - 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 @@ -488,6 +476,51 @@ document rp_string Print the content of a String. end define rp_class printf "(struct RClass *) %p", (void*)$arg0 if ((struct RClass *)($arg0))->ptr.origin_ != $arg0 |