1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

.gdbinit: dump_node [ci skip]

* .gdbinit (dump_node): dump NODE list in gdb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-01-15 13:16:53 +00:00
parent fd7b490fc3
commit 2fd11c760c

View file

@ -964,3 +964,11 @@ define rbi
end
end
end
define dump_node
set $str = rb_parser_dump_tree($arg0, 0)
set $flags = ((struct RBasic*)($str))->flags
printf "%s", (char *)(($flags & RUBY_FL_USER1) ? \
((struct RString*)$str)->as.heap.ptr : \
((struct RString*)$str)->as.ary)
end