summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:02:36 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:02:36 +0000
commit2c8e7a50c1db8fea3fb012052828ad1eea51883f (patch)
tree9948c4ef01b8662c9d14a96cc228d7844af68b71 /.gdbinit
parent0c5e6ab2bb6726b0d70e99db25d5369e196d8ddc (diff)
* include/ruby/ruby.h (struct RBignum): embed digits in RBignum for
small bignums. * bignum.c: RBignum embeded digits implemented. * include/ruby/intern.h: declare rb_big_resize. * gc.c: don't free embedded digits. * numeric.c: replace direct bignum field accessor by abstract field accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val). * sprintf.c: ditto. * compar.c: ditto. * marshal.c: ditto. * random.c: ditto. * .gdbinit: support embedded small bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit12
1 files changed, 10 insertions, 2 deletions
diff --git a/.gdbinit b/.gdbinit
index f54a38fb16..c7bddbd610 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -95,9 +95,17 @@ define rp
else
if ($flags & 0x1f) == 0x0d
printf "T_BIGNUM: sign=%d len=%d ", \
- ((struct RBignum*)$arg0)->sign, ((struct RBignum*)$arg0)->len
+ (($flags & RUBY_FL_USER1) != 0), \
+ (($flags & RUBY_FL_USER2) ? \
+ ($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \
+ ((struct RBignum*)$arg0)->as.heap.len)
+ if $flags & RUBY_FL_USER2
+ printf "(embed) "
+ end
print (struct RBignum *)$arg0
- x/xw ((struct RBignum*)$arg0)->digits
+ x/xw (($flags & RUBY_FL_USER2) ? \
+ ((struct RBignum*)$arg0)->as.ary : \
+ ((struct RBignum*)$arg0)->as.heap.digits)
else
if ($flags & 0x1f) == 0x0e
printf "T_FILE: "