@@ -36,56 +36,11 @@ def cleanup_backtrace(backtrace)
3636 end
3737 cleared
3838 end
39- end
40-
41- class Context
42- def interrupt
43- self . stop_next = 1
44- end
45-
46- private
47-
48- def event_processor
49- Debugger . event_processor
50- end
51-
52- def at_breakpoint ( breakpoint )
53- event_processor . at_breakpoint ( self , breakpoint )
54- end
55-
56- def at_catchpoint ( excpt )
57- event_processor . at_catchpoint ( self , excpt )
58- end
59-
60- def at_tracing ( file , line )
61- if event_processor
62- event_processor . at_tracing ( self , file , line )
63- else
64- Debugger ::print_debug "trace: location=\" %s:%s\" , threadId=%d" , file , line , self . thnum
65- end
66- end
67-
68- def at_line ( file , line )
69- event_processor . at_line ( self , file , line )
70- end
71-
72- def at_return ( file , line )
73- event_processor . at_return ( self , file , line )
74- end
75- end
76-
77- class << self
7839
79- attr_accessor :event_processor , : cli_debug, :xml_debug
40+ attr_accessor :cli_debug , :xml_debug
8041 attr_accessor :control_thread
8142 attr_reader :interface
82-
83- #
84- # Interrupts the current thread
85- #
86- def interrupt
87- current_context . interrupt
88- end
43+
8944
9045 #
9146 # Interrupts the last debugged thread
@@ -156,7 +111,7 @@ def start_control(host, port)
156111 end
157112 begin
158113 @interface = RemoteInterface . new ( session )
159- @event_processor = EventProcessor . new ( interface )
114+ self . handler = EventProcessor . new ( interface )
160115 IdeControlCommandProcessor . new ( interface ) . process_commands
161116 rescue StandardError , ScriptError => ex
162117 bt = ex . backtrace
@@ -177,21 +132,4 @@ def start_control(host, port)
177132 class Exception # :nodoc:
178133 attr_reader :__debug_file , :__debug_line , :__debug_binding , :__debug_context
179134 end
180-
181- module Kernel
182- #
183- # Stops the current thread after a number of _steps_ made.
184- #
185- def debugger ( steps = 1 )
186- Debugger . current_context . stop_next = steps
187- end
188-
189- #
190- # Returns a binding of n-th call frame
191- #
192- def binding_n ( n = 0 )
193- Debugger . current_context . frame_binding [ n +1 ]
194- end
195- end
196-
197135end
0 commit comments