summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 11:52:15 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 11:52:15 +0000
commit9595af4ad59f9a8f98941d22619b61206be1a4c2 (patch)
treeeb27cc82ab0c9674639ba858812f2432320b1019 /.gdbinit
parent719841ca3779e22bb8ad3d2f4d3fc93d0db62030 (diff)
* string.c (rb_str_shared_replace): make str noembed after free.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit14
1 files changed, 13 insertions, 1 deletions
diff --git a/.gdbinit b/.gdbinit
index f91ef63d06..66a4acbbe0 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -56,7 +56,19 @@ define rp
((struct RString*)$arg0)->as.heap.ptr : \
((struct RString*)$arg0)->as.ary)
set print address on
- printf " encoding:%d ", ($flags & (RUBY_FL_USER8|RUBY_FL_USER9|RUBY_FL_USER10|RUBY_FL_USER11)) >> RUBY_ENCODING_SHIFT
+ printf " bytesize:%d ", ($flags & RUBY_FL_USER1) ? \
+ ((struct RString*)$arg0)->as.heap.len : \
+ (($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
+ if !($flags & RUBY_FL_USER1)
+ printf "(embed) "
+ end
+ if ($flags & RUBY_FL_USER2)
+ printf "(shared) "
+ end
+ if ($flags & RUBY_FL_USER3)
+ printf "(assoc) "
+ end
+ printf "encoding:%d ", ($flags & (RUBY_FL_USER8|RUBY_FL_USER9|RUBY_FL_USER10|RUBY_FL_USER11)) >> RUBY_ENCODING_SHIFT
if ($flags & (RUBY_FL_USER12|RUBY_FL_USER13)) == 0
printf "coderange:unknown "
else