summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-10 15:58:46 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-06-10 15:58:46 +0000
commit50d9b43b38ba7c3557305dacbcc78995fe8497d6 (patch)
treecb702c02f7a89d184b792875a3f3d354aed0e64d /.gdbinit
parent100046ed75d0a05b1d4e9212585a4ca4723ac599 (diff)
merges r28086,r28162 and r28173 from trunk into ruby_1_9_2.
-- * .gdbinit (rp): mark singleton classes. -- * .gdbinit (rp): detect and show RTypedData. -- * .gdbinit (rp): show type name for RTypedData. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit11
1 files changed, 8 insertions, 3 deletions
diff --git a/.gdbinit b/.gdbinit
index ab3962fe04..2a38da8892 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -105,7 +105,7 @@ define rp
print (struct RObject *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_CLASS
- printf "T_CLASS: "
+ printf "T_CLASS%s: ", ($flags & RUBY_FL_SINGLETON) ? "*" : ""
print (struct RClass *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_ICLASS
@@ -268,8 +268,13 @@ define rp
print (struct RBasic *)($arg0)
else
if ($flags & RUBY_T_MASK) == RUBY_T_DATA
- printf "T_DATA: "
- print (struct RData *)($arg0)
+ if ((struct RTypedData *)($arg0))->typed_flag == 1
+ printf "T_DATA(%s): ", ((struct RTypedData *)($arg0))->type->wrap_struct_name
+ print (struct RTypedData *)($arg0)
+ else
+ printf "T_DATA: "
+ print (struct RData *)($arg0)
+ end
else
if ($flags & RUBY_T_MASK) == RUBY_T_MATCH
printf "T_MATCH: "