ruby-changes:33382
From: nobu <ko1@a...>
Date: Fri, 28 Mar 2014 16:58:13 +0900 (JST)
Subject: [ruby-changes:33382] nobu:r45461 (trunk): .gdbinit (rp): dump T_SYMBOL
nobu 2014-03-28 16:58:10 +0900 (Fri, 28 Mar 2014) New Revision: 45461 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45461 Log: .gdbinit (rp): dump T_SYMBOL Modified files: trunk/.gdbinit Index: .gdbinit =================================================================== --- .gdbinit (revision 45460) +++ .gdbinit (revision 45461) @@ -211,7 +211,35 @@ define rp https://github.com/ruby/ruby/blob/trunk/.gdbinit#L211 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/