Parent

Files

Debugger::WhereCommand

Implements debugger “where” or “backtrace” command.

Public Instance Methods

execute() click to toggle source
# File cli/ruby-debug/commands/frame.rb, line 160
def execute
  (0...@state.context.stack_size).each do |idx|
    if idx == @state.frame_pos
      print "--> "
    else
      print "    "
    end
    print_frame(idx)

  end
  if truncated_callstack?(@state.context, Debugger.start_sentinal)
    print "Warning: saved frames may be incomplete;\n"
    print "compare debugger backtrace (bt) with Ruby caller(0).\n" 
  end
end
regexp() click to toggle source
# File cli/ruby-debug/commands/frame.rb, line 156
def regexp
  /^\s*(?:w(?:here)?|bt|backtrace)$/
end

Public Class Methods

help(cmd) click to toggle source
# File cli/ruby-debug/commands/frame.rb, line 181
      def help(cmd)
        s = if cmd == 'where'
          %{
            w[here]\tdisplay stack frames
            }
            else
          %{
            bt|backtrace\t\talias for where - display stack frames
         }
            end
        s += %{
Print the entire stack frame. Each frame is numbered, the most recent
frame is 0. frame number can be referred to in the "frame" command;
"up" and "down" add or subtract respectively to frame numbers shown.
The position of the current frame is marked with -->.  } 
      end
help_command() click to toggle source
# File cli/ruby-debug/commands/frame.rb, line 177
def help_command
  %where backtrace|
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.