class Debugger::Processor

A processor handles the kind of front-end to program interaction. Debugger::Processor is the the base class with subclasses Debugger::CommandProcessor and Debugger::ControlCommandProcessor.

Attributes

commands[R]
interface[RW]
processor[R]

Public Instance Methods

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

Format msg with gdb-style annotation header.

# File cli/ruby-debug/processor.rb, line 16
def afmt(msg, newline="\n")
  "\0032\0032#{msg}#{newline}"
end
aprint(msg) click to toggle source

Print “annotation” message msg. Annotation messages are used by the GNU-Emacs front-end to get status about stacks and the state of the debugger without having to poll it for information

# File cli/ruby-debug/processor.rb, line 23
def aprint(msg)
  print afmt(msg) if Debugger.annotate.to_i > 2
end
errmsg(*args) click to toggle source

Print a debugger error message; args should be compatible with something you would pass to Kernel::print.

# File cli/ruby-debug/processor.rb, line 29
def errmsg(*args)
  @interface.errmsg(*args)
end
print(*args) click to toggle source

Print a normal debugger message; args should be compatible with something you would pass to Kernel::print.

Callers of this routine should make sure to use comma to separate format argments rather than %. Otherwise it seems that if the string you want to print has format specifier, which could happen if you are trying to show say a source-code line with “puts” or “print” in it, this print routine will give an error saying it is looking for more arguments.