Class Debugger::Processor
In: cli/ruby-debug/processor.rb
Parent: Object

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.

Methods

afmt   aprint   errmsg   print  

Attributes

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

Public Instance methods

Format msg with gdb-style annotation header.

[Source]

    # File cli/ruby-debug/processor.rb, line 16
16:     def afmt(msg, newline="\n")
17:       "\032\032#{msg}#{newline}"
18:     end

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

[Source]

    # File cli/ruby-debug/processor.rb, line 23
23:     def aprint(msg)
24:       print afmt(msg) if Debugger.annotate.to_i > 2
25:     end

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

[Source]

    # File cli/ruby-debug/processor.rb, line 29
29:     def errmsg(*args)
30:       @interface.errmsg(*args)
31:     end

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.

[Source]

    # File cli/ruby-debug/processor.rb, line 42
42:     def print(*args)
43:       @interface.print(*args)
44:     end

[Validate]