From cd55ddb03cfaa81b3c6930d7132389fadf02b451 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 12 Oct 2014 17:35:25 +0000 Subject: .gdbinit: nd_tree * .gdbinit (nd_tree): dump node tree by dump_node(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- .gdbinit | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.gdbinit') diff --git a/.gdbinit b/.gdbinit index e2a34f3715..1c719a622a 100644 --- a/.gdbinit +++ b/.gdbinit @@ -738,6 +738,12 @@ define nd_tval rp ($arg0).u2.value end +define nd_tree + set $buf = (struct RString *)rb_str_buf_new(0) + call dump_node((VALUE)($buf), rb_str_new(0, 0), 0, ($arg0)) + printf "%s\n", $buf->as.heap.ptr +end + define rb_p call rb_p($arg0) end -- cgit v1.2.3