diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-16 09:17:28 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-16 09:17:28 +0000 |
commit | 41edaf1cd6848eae8abba7ad3b09f8cba771e4d3 (patch) | |
tree | 9966148975ea551fd335fa486ab29bc6f93e3f3b /.gdbinit | |
parent | 37aa93141e7154e716228969de270086d011d48b (diff) | |
download | ruby-41edaf1cd6848eae8abba7ad3b09f8cba771e4d3.tar.gz ruby-41edaf1cd6848eae8abba7ad3b09f8cba771e4d3.tar.xz ruby-41edaf1cd6848eae8abba7ad3b09f8cba771e4d3.zip |
* ruby.c (RUBY_ENCODING_SHIFT): added as enum.
* .gdbinit (rp): show encoding and coderange for strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -56,7 +56,20 @@ define rp ((struct RString*)$arg0)->as.heap.ptr : \ ((struct RString*)$arg0)->as.ary) set print address on - printf " " + 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 + if ($flags & (RUBY_FL_USER12|RUBY_FL_USER13)) == RUBY_FL_USER12 + printf "coderange:single " + else + if ($flags & (RUBY_FL_USER12|RUBY_FL_USER13)) == RUBY_FL_USER13 + printf "coderange:single " + else + printf "coderange:broken " + end + end + end print (struct RString *)$arg0 else if ($flags & RUBY_T_MASK) == RUBY_T_REGEXP |