mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
.gdbinit: improve for displaying class/module
* .gdbinit (rp_class): show class name, if possible. * .gdbinit (rb_ancestors): call rp_class directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c143c97ef
commit
4cdb8fd7ec
1 changed files with 2 additions and 1 deletions
3
.gdbinit
3
.gdbinit
|
@ -368,6 +368,7 @@ define rp_class
|
|||
printf " -> %p", ((struct RClass *)($arg0))->ptr.origin
|
||||
end
|
||||
printf "\n"
|
||||
rb_classname $arg0
|
||||
print *(struct RClass *)($arg0)
|
||||
print *((struct RClass *)($arg0))->ptr
|
||||
end
|
||||
|
@ -735,7 +736,7 @@ end
|
|||
define rb_ancestors
|
||||
set $rb_ancestors_module = $arg0
|
||||
while $rb_ancestors_module
|
||||
rp $rb_ancestors_module
|
||||
rp_class $rb_ancestors_module
|
||||
set $rb_ancestors_module = ((struct RClass *)($rb_ancestors_module))->ptr.super
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue