summaryrefslogtreecommitdiff
path: root/.gdbinit
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-12 17:35:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-12 17:35:25 +0000
commitcd55ddb03cfaa81b3c6930d7132389fadf02b451 (patch)
treee537d49967173c1285c12b0911fc7defa9c767c6 /.gdbinit
parente9c5e7625cfbeacf18c2dfd6ac9d9b3049beadac (diff)
.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
Diffstat (limited to '.gdbinit')
-rw-r--r--.gdbinit6
1 files changed, 6 insertions, 0 deletions
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