Files

Debugger::LocalInterface

A LocalInterface is the kind of I/O interactive performed when the user interface is in the same process as the debugged program. Compare with Debugger::RemoteInterface.

Constants

FILE_HISTORY

Attributes

command_queue[RW]
histfile[RW]
history_length[RW]
history_save[RW]
restart_file[RW]

Public Class Methods

new() click to toggle source
# File cli/ruby-debug/interface.rb, line 63
def initialize()
  super
  @command_queue = []
  @restart_file = nil

  if @have_readline
    # take gdb's default
    @history_length = ENV['HISTSIZE'] ? ENV['HISTSIZE'].to_i : 256  
    @histfile = File.join(ENV['HOME']||ENV['HOMEPATH']||'.', 
                          FILE_HISTORY)
    open(@histfile, 'r') do |file|
      file.each do |line|
        line.chomp!
        Readline::HISTORY << line
      end
    end if File.exist?(@histfile)
  end
end

Public Instance Methods

close() click to toggle source
# File cli/ruby-debug/interface.rb, line 94
def close
end
confirm(prompt) click to toggle source
# File cli/ruby-debug/interface.rb, line 86
def confirm(prompt)
  readline(prompt, false)
end
finalize() click to toggle source

Things to do before quitting

# File cli/ruby-debug/interface.rb, line 98
def finalize
  if Debugger.method_defined?("annotate") and Debugger.annotate.to_i > 2
    print "\0032\0032exited\n\n" 
  end
  if Debugger.respond_to?(:save_history)
    Debugger.save_history 
  end
end
read_command(prompt) click to toggle source
# File cli/ruby-debug/interface.rb, line 82
def read_command(prompt)
  readline(prompt, true)
end
readline_support?() click to toggle source
# File cli/ruby-debug/interface.rb, line 107
def readline_support?
  @have_readline
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.