diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-09 05:47:04 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-09 05:47:04 +0000 |
commit | c86ce094e283f400889f4f0bc97b897e84df04ac (patch) | |
tree | abeb5d04d71bf6318c1e81f88f5ff9877c51ed2d /.gdbinit | |
parent | 517a1c340631ecfcb7c2d5558e864a4fe60e315f (diff) | |
download | ruby-c86ce094e283f400889f4f0bc97b897e84df04ac.tar.gz |
* include/ruby/ruby.h: embeds the elements of an array into its
struct RArray for # of elements <= 3.
* array.c: ditto.
* gc.c (gc_mark_children): following the change of struct RArray.
* ext/tk/tcltklib.c (ip_ruby_cmp): ditto.
* parse.y (coverage): ditto.
* proc.c (curry): ditto.
* .gdbinit: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 29 |
1 files changed, 27 insertions, 2 deletions
@@ -104,9 +104,34 @@ define rp print (struct RRegexp *)$arg0 else if ($flags & RUBY_T_MASK) == RUBY_T_ARRAY - printf "T_ARRAY: len=%ld ", ((struct RArray*)$arg0)->len + if ($flags & RUBY_FL_USER1) + set $len = (($flags & (RUBY_FL_USER3|RUBY_FL_USER4)) >> (RUBY_FL_USHIFT+3)) + printf "T_ARRAY: len=%ld ", $len + printf "(embed) " + if ($len == 0) + printf "{(empty)} " + else + output/x *((VALUE*)((struct RArray*)$arg0)->as.ary) @ $len + printf " " + end + else + set $len = ((struct RArray*)$arg0)->as.heap.len + printf "T_ARRAY: len=%ld ", $len + if ($flags & RUBY_FL_USER2) + printf "(shared) shared=" + output/x ((struct RArray*)$arg0)->as.heap.aux.shared + printf " " + else + printf "(ownership) capa=%ld ", ((struct RArray*)$arg0)->as.heap.aux.capa + end + if ($len == 0) + printf "{(empty)} " + else + output/x *((VALUE*)((struct RArray*)$arg0)->as.heap.ptr) @ $len + printf " " + end + end print (struct RArray *)$arg0 - x/xw ((struct RArray*)$arg0)->ptr else if ($flags & RUBY_T_MASK) == RUBY_T_FIXNUM printf "T_FIXNUM: " |