summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-22 15:51:41 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-22 15:51:41 (GMT)
commit5a7db50517207df4ea6c86f4f7ae106966ff1cec (patch)
tree0f77b438a6b14d0c28ae863fff37fd527627a73e /.gdbinit
parent91fcdd186568931bd3ab36419ced4bf25b7fb27c (diff)
.gdbinit: improve rp for class
* .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
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit6
1 files changed, 6 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index c4cdd1f..6992e56 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -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)