summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 07:58:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 07:58:10 (GMT)
commit4a3f08d397889f24504c74ee5c7165dcc8a26c36 (patch)
tree6a7f4839f7d00f731545ffc49f7eb8f57f907538 /.gdbinit
parent9d1bf5b33a118c65772f791cfc43276c070b1892 (diff)
.gdbinit (rp): dump T_SYMBOL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit30
1 files changed, 29 insertions, 1 deletions
diff --git a/.gdbinit b/.gdbinit
index ba6db58..7a79da5 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -211,7 +211,35 @@ define rp
else
if ($flags & RUBY_T_MASK) == RUBY_T_SYMBOL
printf "%sT_SYMBOL%s: ", $color_type, $color_end
- print (struct RBasic *)($arg0)
+ print (struct RSymbol *)($arg0)
+ set $id_type = ((struct RSymbol *)($arg0))->type
+ if $id_type == RUBY_ID_LOCAL
+ printf "l"
+ else
+ if $id_type == RUBY_ID_INSTANCE
+ printf "i"
+ else
+ if $id_type == RUBY_ID_GLOBAL
+ printf "G"
+ else
+ if $id_type == RUBY_ID_ATTRSET
+ printf "a"
+ else
+ if $id_type == RUBY_ID_CONST
+ printf "C"
+ else
+ if $id_type == RUBY_ID_CLASS
+ printf "c"
+ else
+ printf "j"
+ end
+ end
+ end
+ end
+ end
+ end
+ set $id_fstr = ((struct RSymbol *)($arg0))->fstr
+ rp_string $id_fstr
else
if ($flags & RUBY_T_MASK) == RUBY_T_UNDEF
printf "%sT_UNDEF%s: ", $color_type, $color_end