.gdbinit: T_IMEMO

* .gdbinit (rp_imemo): print the content support of each T_IMEMO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-03-26 06:50:57 +00:00
parent 3f8d077744
commit 785438a3d7
1 changed files with 35 additions and 1 deletions

View File

@ -249,7 +249,7 @@ define rp
printf "%sT_IMEMO%s(", $color_type, $color_end
output (enum imemo_type)(($flags>>RUBY_FL_USHIFT)&imemo_mask)
printf "): "
print *((VALUE (*)[4])($arg0))
rp_imemo $arg0
else
if ($flags & RUBY_T_MASK) == RUBY_T_NODE
printf "%sT_NODE%s(", $color_type, $color_end
@ -467,6 +467,40 @@ document rp_class
Print the content of a Class/Module.
end
define rp_imemo
set $flags = (((struct RBasic *)($arg0))->flags >> RUBY_FL_USHIFT) & imemo_mask
if $flags == imemo_cref
printf "(rb_cref_t *) %p\n", (void*)$arg0
print *(rb_cref_t *)$arg0
else
if $flags == imemo_svar
printf "(struct vm_svar *) %p\n", (void*)$arg0
print *(struct vm_svar *)$arg0
else
if $flags == imemo_throw_data
printf "(struct vm_throw_data *) %p\n", (void*)$arg0
print *(struct vm_throw_data *)$arg0
else
if $flags == imemo_ifunc
printf "(struct vm_ifunc *) %p\n", (void*)$arg0
print *(struct vm_ifunc *)$arg0
else
if $flags == imemo_memo
printf "(struct MEMO *) %p\n", (void*)$arg0
print *(struct MEMO *)$arg0
else
printf "(struct RIMemo *) %p\n", (void*)$arg0
print *(struct RIMemo *)$arg0
end
end
end
end
end
end
document rp_imemo
Print the content of a memo
end
define nd_type
print (enum node_type)((((NODE*)($arg0))->flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
end