diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-15 13:16:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-15 13:16:53 +0000 |
commit | 2fd11c760ca2f903092c461566bd522636ea45cc (patch) | |
tree | 0898c5b62377923e3b6a8fd17d6d435e3cfef1b2 /.gdbinit | |
parent | fd7b490fc3dc33c22b7c173617363953fc8453c8 (diff) |
.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
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |