class Debugger::Processor

Should this be a mixin?

Attributes

interface[RW]

Public Instance Methods

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

Format msg with gdb-style annotation header

# File lib/ruby-debug/processor.rb, line 11
def afmt(msg, newline="\n")
  "\0032\0032#{msg}#{newline}"
end
aprint(msg) click to toggle source
# File lib/ruby-debug/processor.rb, line 15
def aprint(msg)
  print afmt(msg) if Debugger.annotate.to_i > 2
end
errmsg(*args) click to toggle source

FIXME: use delegate?

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

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.