Skip to content

Commit

Permalink
.gdbinit: improve rp for class
Browse files Browse the repository at this point in the history
* .gdbinit (rp): improve for class/iclass/module so print content of
  RClass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jun 22, 2012
1 parent 91fcdd1 commit 5a7db50
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gdbinit
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,20 @@ define rp
if ($flags & RUBY_T_MASK) == RUBY_T_CLASS
printf "T_CLASS%s: ", ($flags & RUBY_FL_SINGLETON) ? "*" : ""
print (struct RClass *)($arg0)
print *(struct RClass *)($arg0)
print *((struct RClass *)($arg0))->ptr
else
if ($flags & RUBY_T_MASK) == RUBY_T_ICLASS
printf "T_ICLASS: "
print (struct RClass *)($arg0)
print *(struct RClass *)($arg0)
print *((struct RClass *)($arg0))->ptr
else
if ($flags & RUBY_T_MASK) == RUBY_T_MODULE
printf "T_MODULE: "
print (struct RClass *)($arg0)
print *(struct RClass *)($arg0)
print *((struct RClass *)($arg0))->ptr
else
if ($flags & RUBY_T_MASK) == RUBY_T_FLOAT
printf "T_FLOAT: %.16g ", (((struct RFloat*)($arg0))->float_value)
Expand Down

0 comments on commit 5a7db50

Please sign in to comment.