summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit8
1 files changed, 8 insertions, 0 deletions
diff --git a/.gdbinit b/.gdbinit
index 03c2b65..bc79f51 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -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