ruby-changes:10726
From: nobu <ko1@a...>
Date: Fri, 13 Feb 2009 23:36:34 +0900 (JST)
Subject: [ruby-changes:10726] Ruby:r22290 (trunk): * .gdbinit (iseq): added.
nobu 2009-02-13 23:33:48 +0900 (Fri, 13 Feb 2009) New Revision: 22290 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22290 Log: * .gdbinit (iseq): added. Modified files: trunk/.gdbinit Index: .gdbinit =================================================================== --- .gdbinit (revision 22289) +++ .gdbinit (revision 22290) @@ -1,6 +1,3 @@ -if dummy_gdb_enums.special_consts -end - define rp if (VALUE)$arg0 & RUBY_FIXNUM_FLAG printf "FIXNUM: %ld\n", $arg0 >> 1 @@ -558,3 +555,29 @@ define rb_backtrace call rb_backtrace() end + +define iseq + if $arg0->type == ISEQ_ELEMENT_NONE + echo [none]\n + end + if $arg0->type == ISEQ_ELEMENT_LABEL + print *(LABEL*)$arg0 + end + if $arg0->type == ISEQ_ELEMENT_INSN + print *(INSN*)$arg0 + if ((INSN*)$arg0)->insn_id != YARVINSN_jump + set $i = 0 + set $operand_size = ((INSN*)$arg0)->operand_size + set $operands = ((INSN*)$arg0)->operands + while $i < $operand_size + rp $operands[$i++] + end + end + end + if $arg0->type == ISEQ_ELEMENT_ADJUST + print *(ADJUST*)$arg0 + end +end + +if dummy_gdb_enums.special_consts +end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/