Parent

Files

Debugger::Interface

An Interface is the kind of input/output interaction that goes on between the user and the debugged program. It includes things like how one wants to show error messages, or read input. This is the base class. Subclasses inlcude Debugger::LocalInterface, Debugger::RemoteInterface and Debugger::ScriptInterface.

Attributes

have_readline[W]

Public Class Methods

new() click to toggle source
# File cli/ruby-debug/interface.rb, line 11
def initialize
  begin
    require 'readline'
    @have_readline = true
    @history_save = true
  rescue LoadError
    @have_readline = false
    @history_save = false
  end
end

Public Instance Methods

afmt(msg, newline="\n") click to toggle source

Format msg with gdb-style annotation header

# File cli/ruby-debug/interface.rb, line 36
def afmt(msg, newline="\n")
  "\0032\0032#{msg}#{newline}"
end
aprint(msg) click to toggle source
# File cli/ruby-debug/interface.rb, line 40
def aprint(msg)
  print afmt(msg)
end
errmsg(*args) click to toggle source

Common routine for reporting debugger error messages. Derived classed may want to override this to capture output.

# File cli/ruby-debug/interface.rb, line 24
def errmsg(*args)
  if Debugger.annotate.to_i > 2
    aprint 'error-begin'
    print(*args)
    aprint ''
  else
    print '*** '
    print(*args)
  end
end
finalize() click to toggle source

Things we do before terminating.

# File cli/ruby-debug/interface.rb, line 45
def finalize
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.