зеркало из https://github.com/github/ruby.git
* .gdbinit (iseq): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
36dcff1cf5
Коммит
2a2cc2e9c4
29
.gdbinit
29
.gdbinit
|
@ -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 @@ end
|
|||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче