Class | Debugger::Interface |
In: |
cli/ruby-debug/interface.rb
|
Parent: | Object |
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.
have_readline | [W] |
# File cli/ruby-debug/interface.rb, line 11 11: def initialize 12: begin 13: require 'readline' 14: @have_readline = true 15: @history_save = true 16: rescue LoadError 17: @have_readline = false 18: @history_save = false 19: end 20: end
Format msg with gdb-style annotation header
# File cli/ruby-debug/interface.rb, line 36 36: def afmt(msg, newline="\n") 37: "\032\032#{msg}#{newline}" 38: end
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 24: def errmsg(*args) 25: if Debugger.annotate.to_i > 2 26: aprint 'error-begin' 27: print(*args) 28: aprint '' 29: else 30: print '*** ' 31: print(*args) 32: end 33: end