Sha256: a1e9fb41bf10617ab27dd97fe04e9624ea3263a6caa2c9dcb177daf6b776e65c

Contents?: true

Size: 1.09 KB

Versions: 63

Compression:

Stored size: 1.09 KB

Contents

module Debugger
  # Implements the debugger 'finish' command.
  class FinishCommand < Command
    self.allow_in_post_mortem = false
    self.need_context         = true
    
    def regexp
      /^\s*fin(?:ish)? (?:\s+(.*))?$/x
    end

    def execute
      max_frame = @state.context.stack_size - @state.frame_pos
      if !@match[1] or @match[1].empty?
        frame_pos = @state.frame_pos
      else
        frame_pos = get_int(@match[1], "Finish", 0, max_frame-1, 0)
        return nil unless frame_pos
      end
      @state.context.stop_frame = frame_pos
      @state.frame_pos = 0
      @state.proceed
    end

    class << self
      def help_command
        'finish'
      end

      def help(cmd)
        %{
          fin[ish] [frame-number]\tExecute until selected stack frame returns.

If no frame number is given, we run until the currently selected frame
returns.  The currently selected frame starts out the most-recent
frame or 0 if no frame positioning (e.g "up", "down" or "frame") has
been performed. If a frame number is given we run until that frame
returns.
        }
      end
    end
  end
end

Version data entries

63 entries across 60 versions & 11 rubygems

Version Path
ruby-debug-0.11.0 cli/ruby-debug/commands/finish.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/debugger-1.6.8/lib/ruby-debug/commands/finish.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/ruby-debug-0.10.6/cli/ruby-debug/commands/finish.rb
ruby-debug-0.10.6 cli/ruby-debug/commands/finish.rb
debugger-1.6.8 lib/ruby-debug/commands/finish.rb
debugger-1.6.7 lib/ruby-debug/commands/finish.rb
debugger-1.6.6 lib/ruby-debug/commands/finish.rb
debugger-1.6.5 lib/ruby-debug/commands/finish.rb
debugger-1.6.4 lib/ruby-debug/commands/finish.rb
debugger-1.6.3 lib/ruby-debug/commands/finish.rb
ruby-debug-0.10.5.rc9 cli/ruby-debug/commands/finish.rb
debugger-1.6.2 lib/ruby-debug/commands/finish.rb
ruby-debug-0.10.5.rc8 cli/ruby-debug/commands/finish.rb
candlepin-api-0.4.0 bundle/ruby/gems/debugger-1.6.1/lib/ruby-debug/commands/finish.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/debugger-1.6.1/lib/ruby-debug/commands/finish.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/finish.rb
ruby-debug-0.10.5.rc7 cli/ruby-debug/commands/finish.rb
ruby-debug-0.10.5.rc5 cli/ruby-debug/commands/finish.rb
ruby-debug-0.10.5.rc4 cli/ruby-debug/commands/finish.rb
debugger-1.6.1 lib/ruby-debug/commands/finish.rb