From 4a3f08d397889f24504c74ee5c7165dcc8a26c36 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 28 Mar 2014 07:58:10 +0000 Subject: .gdbinit (rp): dump T_SYMBOL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 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 -- cgit v0.10.2