All pastes #964441 Raw Edit

何か

public text v1 · immutable
#964441 ·published 2008-03-31 07:20 UTC
rendered paste body
define dump_rb_bt
  set $t = ruby_frame
  while $t
    printf "[0x%08x] ", $t
    if $t->last_func
      printf "%s ", rb_id2name($t->last_func)
    else
      printf "..."
    end
    if $t->node.nd_file
      printf "(%s:%d)¥n", $t->node.nd_file, ($t->node.flags >> 19) & ((1 << (sizeof(NODE*) * 8 - 19)) - 1)
    else
      printf "(UNKNOWN)¥n"
    end
    set $t = $t->prev
  end
end

document dump_rb_bt
  dumps the current frame stack. usage: dump_rb_bt
end