Should this be a mixin?
Format msg with gdb-style annotation header
# File cli/ruby-debug/processor.rb, line 11 def afmt(msg, newline="\n") "\0032\0032#{msg}#{newline}" end
# File cli/ruby-debug/processor.rb, line 15 def aprint(msg) print afmt(msg) if Debugger.annotate.to_i > 2 end
FIXME: use delegate?
# File cli/ruby-debug/processor.rb, line 20 def errmsg(*args) @interface.errmsg(*args) end
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.
# File cli/ruby-debug/processor.rb, line 30 def print(*args) @interface.print(*args) end