Class: DebuggerXml::Ide::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/debugger_xml/ide/processor.rb

Direct Known Subclasses

Vim::Processor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interface, proxy) ⇒ Processor

Returns a new instance of Processor.



31
32
33
34
35
36
# File 'lib/debugger_xml/ide/processor.rb', line 31

def initialize(interface, proxy)
  @mutex = Mutex.new
  @interface = interface
  @proxy = proxy
  @display = []
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



28
29
30
# File 'lib/debugger_xml/ide/processor.rb', line 28

def context
  @context
end

#displayObject (readonly)

Returns the value of attribute display.



28
29
30
# File 'lib/debugger_xml/ide/processor.rb', line 28

def display
  @display
end

#fileObject (readonly)

Returns the value of attribute file.



28
29
30
# File 'lib/debugger_xml/ide/processor.rb', line 28

def file
  @file
end

#interfaceObject

Returns the value of attribute interface.



29
30
31
# File 'lib/debugger_xml/ide/processor.rb', line 29

def interface
  @interface
end

#lineObject (readonly)

Returns the value of attribute line.



28
29
30
# File 'lib/debugger_xml/ide/processor.rb', line 28

def line
  @line
end

Instance Method Details

#at_breakpoint(context, breakpoint) ⇒ Object



38
39
40
41
42
# File 'lib/debugger_xml/ide/processor.rb', line 38

def at_breakpoint(context, breakpoint)
  raise "@last_breakpoint supposed to be nil. is #{@last_breakpoint}" if @last_breakpoint
  # at_breakpoint is immediately followed by #at_line event. So postpone breakpoint printing until #at_line.
  @last_breakpoint = breakpoint
end

#at_catchpoint(context, excpt) ⇒ Object

TODO: Catching exceptions doesn’t work so far, need to fix



46
47
# File 'lib/debugger_xml/ide/processor.rb', line 46

def at_catchpoint(context, excpt)
end

#at_line(context, file, line) ⇒ Object



53
54
55
56
57
58
# File 'lib/debugger_xml/ide/processor.rb', line 53

def at_line(context, file, line)
  if context.nil? || context.stop_reason == :step
    print_file_line(context, file, line)
  end
  line_event(context, file, line)
end

#at_line?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/debugger_xml/ide/processor.rb', line 67

def at_line?
  !!@line
end

#at_return(context, file, line) ⇒ Object



61
62
63
64
65
# File 'lib/debugger_xml/ide/processor.rb', line 61

def at_return(context, file, line)
  print_file_line(context, file, line)
  context.stop_frame = -1
  line_event(context, file, line)
end

#at_tracing(*args) ⇒ Object

We don’t have tracing for IDE



50
51
# File 'lib/debugger_xml/ide/processor.rb', line 50

def at_tracing(*args)
end