class Byebug::WhereCommand

Implements byebug “where” or “backtrace” command.

def description

def description
  %{
    w[here]|bt|backtrace\tdisplay stack frames
    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

def execute

def execute
  print_backtrace
  if truncated_callstack?(Byebug.start_sentinal)
     print \
       "Warning: saved frames may be incomplete; compare with caller(0)\n"
  end
end

def names

def names
  %w(where backtrace)
end

def regexp

def regexp
  /^\s*(?:w(?:here)?|bt|backtrace)$/
end