ruby-debug-ide 0.1.10 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby-debug.rb +10 -2
- data/lib/ruby-debug/command.rb +21 -0
- data/lib/ruby-debug/commands/catchpoint.rb +10 -14
- data/lib/ruby-debug/commands/condition.rb +51 -0
- data/lib/ruby-debug/commands/enable.rb +203 -0
- data/lib/ruby-debug/commands/tags +168 -0
- data/lib/ruby-debug/event_processor.rb +31 -6
- data/lib/ruby-debug/helper.rb +7 -0
- data/lib/ruby-debug/processor.rb +16 -17
- data/lib/ruby-debug/tags +260 -0
- data/lib/ruby-debug/xml_printer.rb +12 -0
- metadata +8 -5
- data/README +0 -0
data/lib/ruby-debug.rb
CHANGED
@@ -46,6 +46,10 @@ module Debugger
|
|
46
46
|
def at_line(file, line)
|
47
47
|
event_processor.at_line(self, file, line)
|
48
48
|
end
|
49
|
+
|
50
|
+
def at_return(file, line)
|
51
|
+
event_processor.at_return(self, file, line)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
|
51
55
|
class << self
|
@@ -79,13 +83,15 @@ module Debugger
|
|
79
83
|
|
80
84
|
start_control(host, port)
|
81
85
|
|
86
|
+
raise "Control thread did not start (#{@control_thread}}" unless @control_thread && @control_thread.alive?
|
87
|
+
|
82
88
|
@mutex = Mutex.new
|
83
89
|
@proceed = ConditionVariable.new
|
84
90
|
|
85
|
-
# wait for start command
|
91
|
+
# wait for 'start' command
|
86
92
|
@mutex.synchronize do
|
87
93
|
@proceed.wait(@mutex)
|
88
|
-
end
|
94
|
+
end
|
89
95
|
|
90
96
|
debug_load Debugger::PROG_SCRIPT
|
91
97
|
end
|
@@ -100,7 +106,9 @@ module Debugger
|
|
100
106
|
raise "Debugger is not started" unless started?
|
101
107
|
return if @control_thread
|
102
108
|
@control_thread = DebugThread.new do
|
109
|
+
host ||= 'localhost' # nil does not seem to work for IPv6, localhost does
|
103
110
|
Debugger.print_debug("Waiting for connection on '#{host}:#{port}'")
|
111
|
+
$stderr.puts "Fast Debugger (ruby-debug-ide 0.2.0) listens on #{host}:#{port}"
|
104
112
|
server = TCPServer.new(host, port)
|
105
113
|
while (session = server.accept)
|
106
114
|
begin
|
data/lib/ruby-debug/command.rb
CHANGED
@@ -3,6 +3,22 @@ require 'ruby-debug/helper'
|
|
3
3
|
module Debugger
|
4
4
|
|
5
5
|
class Command # :nodoc:
|
6
|
+
SubcmdStruct=Struct.new(:name, :min, :short_help, :long_help) unless
|
7
|
+
defined?(SubcmdStruct)
|
8
|
+
|
9
|
+
# Find param in subcmds. param id downcased and can be abbreviated
|
10
|
+
# to the minimum length listed in the subcommands
|
11
|
+
def find(subcmds, param)
|
12
|
+
param.downcase!
|
13
|
+
for try_subcmd in subcmds do
|
14
|
+
if (param.size >= try_subcmd.min) and
|
15
|
+
(try_subcmd.name[0..param.size-1] == param)
|
16
|
+
return try_subcmd
|
17
|
+
end
|
18
|
+
end
|
19
|
+
return nil
|
20
|
+
end
|
21
|
+
|
6
22
|
class << self
|
7
23
|
def commands
|
8
24
|
@commands ||= []
|
@@ -67,6 +83,11 @@ module Debugger
|
|
67
83
|
end
|
68
84
|
end
|
69
85
|
|
86
|
+
# FIXME: use delegate?
|
87
|
+
def errmsg(*args)
|
88
|
+
@printer.print_error(*args)
|
89
|
+
end
|
90
|
+
|
70
91
|
def print(*args)
|
71
92
|
@state.print(*args)
|
72
93
|
end
|
@@ -3,24 +3,20 @@ module Debugger
|
|
3
3
|
self.control = true
|
4
4
|
|
5
5
|
def regexp
|
6
|
-
/^\s*cat(?:ch)?(?:\s+(.+))
|
6
|
+
/^\s* cat(?:ch)? (?:\s+(.+))? $/x
|
7
7
|
end
|
8
8
|
|
9
9
|
def execute
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
print_msg "Clear catchpoint."
|
14
|
-
else
|
15
|
-
Debugger.catchpoint = excn
|
16
|
-
print_msg "Set catchpoint %s.", excn
|
17
|
-
end
|
10
|
+
excn = @match[1]
|
11
|
+
unless excn
|
12
|
+
errmsg "Exception class must be specified for 'catch' command"
|
18
13
|
else
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
print_msg "No catchpoint."
|
14
|
+
binding = @state.context ? get_binding : TOPLEVEL_BINDING
|
15
|
+
unless debug_eval("#{excn}.is_a?(Class)", binding)
|
16
|
+
print_msg "Warning #{excn} is not known to be a Class"
|
23
17
|
end
|
18
|
+
Debugger.add_catchpoint(excn)
|
19
|
+
print_msg "Set catchpoint %s.", excn
|
24
20
|
end
|
25
21
|
end
|
26
22
|
|
@@ -37,4 +33,4 @@ module Debugger
|
|
37
33
|
end
|
38
34
|
end
|
39
35
|
end
|
40
|
-
end
|
36
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Debugger
|
2
|
+
|
3
|
+
class ConditionCommand < Command # :nodoc:
|
4
|
+
self.control = true
|
5
|
+
|
6
|
+
def regexp
|
7
|
+
/^\s* cond(?:ition)? (?:\s+(\d+)\s*(.*))?$/ix
|
8
|
+
end
|
9
|
+
|
10
|
+
def execute
|
11
|
+
if not @match[1]
|
12
|
+
errmsg "\"condition\" must be followed a breakpoint number and expression\n"
|
13
|
+
else
|
14
|
+
breakpoints = Debugger.breakpoints.sort_by{|b| b.id }
|
15
|
+
largest = breakpoints.inject(0) do |largest, b|
|
16
|
+
largest = b.id if b.id > largest
|
17
|
+
end
|
18
|
+
if 0 == largest
|
19
|
+
print "No breakpoints have been set.\n"
|
20
|
+
return
|
21
|
+
end
|
22
|
+
pos = get_int(@match[1], "Condition", 1, largest)
|
23
|
+
return unless pos
|
24
|
+
breakpoints.each do |b|
|
25
|
+
if b.id == pos
|
26
|
+
b.expr = @match[2].empty? ? nil : @match[2]
|
27
|
+
print_contdition_set(b.id)
|
28
|
+
break
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
class << self
|
36
|
+
def help_command
|
37
|
+
'condition'
|
38
|
+
end
|
39
|
+
|
40
|
+
def help(cmd)
|
41
|
+
%{
|
42
|
+
Condition breakpoint-number expression
|
43
|
+
Specify breakpoint number N to break only if COND is true.
|
44
|
+
N is an integer and COND is an expression to be evaluated whenever
|
45
|
+
breakpoint N is reached. If the empty string is used, the condition is removed.
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end # module Debugger
|
@@ -0,0 +1,203 @@
|
|
1
|
+
module Debugger
|
2
|
+
# Mix-in module to assist in command parsing.
|
3
|
+
module EnableDisableFunctions # :nodoc:
|
4
|
+
def enable_disable_breakpoints(is_enable, args)
|
5
|
+
breakpoints = Debugger.breakpoints.sort_by{|b| b.id }
|
6
|
+
largest = breakpoints.inject(0) do |largest, b|
|
7
|
+
largest = b.id if b.id > largest
|
8
|
+
end
|
9
|
+
if 0 == largest
|
10
|
+
errmsg "No breakpoints have been set.\n"
|
11
|
+
return
|
12
|
+
end
|
13
|
+
args.each do |pos|
|
14
|
+
pos = get_int(pos, "#{is_enable} breakpoints", 1, largest)
|
15
|
+
return nil unless pos
|
16
|
+
breakpoints.each do |b|
|
17
|
+
if b.id == pos
|
18
|
+
enabled = ("Enable" == is_enable)
|
19
|
+
if enabled
|
20
|
+
unless syntax_valid?(b.expr)
|
21
|
+
errmsg("Expression \"#{b.expr}\" syntactically incorrect; breakpoint remains disabled.\n")
|
22
|
+
break
|
23
|
+
end
|
24
|
+
end
|
25
|
+
b.enabled = enabled
|
26
|
+
enabled ? print_breakpoint_enabled(b) : print_breakpoint_disabled(b)
|
27
|
+
break
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def enable_disable_display(is_enable, args)
|
34
|
+
if 0 == @state.display.size
|
35
|
+
errmsg "No display expressions have been set.\n"
|
36
|
+
return
|
37
|
+
end
|
38
|
+
args.each do |pos|
|
39
|
+
pos = get_int(pos, "#{is_enable} display", 1, @state.display.size)
|
40
|
+
return nil unless pos
|
41
|
+
@state.display[pos-1][0] = ("Enable" == is_enable)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
class EnableCommand < Command # :nodoc:
|
48
|
+
Subcommands =
|
49
|
+
[
|
50
|
+
['breakpoints', 2, "Enable specified breakpoints",
|
51
|
+
"Give breakpoint numbers (separated by spaces) as arguments.
|
52
|
+
This is used to cancel the effect of the \"disable\" command."
|
53
|
+
],
|
54
|
+
['display', 2,
|
55
|
+
"Enable some expressions to be displayed when program stops",
|
56
|
+
"Arguments are the code numbers of the expressions to resume displaying.
|
57
|
+
Do \"info display\" to see current list of code numbers."],
|
58
|
+
].map do |name, min, short_help, long_help|
|
59
|
+
SubcmdStruct.new(name, min, short_help, long_help)
|
60
|
+
end unless defined?(Subcommands)
|
61
|
+
|
62
|
+
def regexp
|
63
|
+
/^\s* en(?:able)? (?:\s+(.*))?$/ix
|
64
|
+
end
|
65
|
+
|
66
|
+
def execute
|
67
|
+
if not @match[1]
|
68
|
+
errmsg "\"enable\" must be followed \"display\", \"breakpoints\"" +
|
69
|
+
" or breakpoint numbers.\n"
|
70
|
+
else
|
71
|
+
args = @match[1].split(/[ \t]+/)
|
72
|
+
param = args.shift
|
73
|
+
subcmd = find(Subcommands, param)
|
74
|
+
if subcmd
|
75
|
+
send("enable_#{subcmd.name}", args)
|
76
|
+
else
|
77
|
+
send("enable_breakpoints", args.unshift(param))
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def enable_breakpoints(args)
|
83
|
+
enable_disable_breakpoints("Enable", args)
|
84
|
+
end
|
85
|
+
|
86
|
+
def enable_display(args)
|
87
|
+
enable_disable_display("Enable", args)
|
88
|
+
end
|
89
|
+
|
90
|
+
class << self
|
91
|
+
def help_command
|
92
|
+
'enable'
|
93
|
+
end
|
94
|
+
|
95
|
+
def help(args)
|
96
|
+
if args[1]
|
97
|
+
s = args[1]
|
98
|
+
subcmd = Subcommands.find do |try_subcmd|
|
99
|
+
(s.size >= try_subcmd.min) and
|
100
|
+
(try_subcmd.name[0..s.size-1] == s)
|
101
|
+
end
|
102
|
+
if subcmd
|
103
|
+
str = subcmd.short_help + '.'
|
104
|
+
str += "\n" + subcmd.long_help if subcmd.long_help
|
105
|
+
return str
|
106
|
+
else
|
107
|
+
return "Invalid 'enable' subcommand '#{args[1]}'."
|
108
|
+
end
|
109
|
+
end
|
110
|
+
s = %{
|
111
|
+
Enable some things.
|
112
|
+
This is used to cancel the effect of the "disable" command.
|
113
|
+
--
|
114
|
+
List of enable subcommands:
|
115
|
+
--
|
116
|
+
}
|
117
|
+
for subcmd in Subcommands do
|
118
|
+
s += "enable #{subcmd.name} -- #{subcmd.short_help}\n"
|
119
|
+
end
|
120
|
+
return s
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
class DisableCommand < Command # :nodoc:
|
126
|
+
Subcommands =
|
127
|
+
[
|
128
|
+
['breakpoints', 1, "Disable some breakpoints",
|
129
|
+
"Arguments are breakpoint numbers with spaces in between.
|
130
|
+
A disabled breakpoint is not forgotten, but has no effect until reenabled."],
|
131
|
+
['display', 1, "Disable some display expressions when program stops",
|
132
|
+
"Arguments are the code numbers of the expressions to stop displaying.
|
133
|
+
Do \"info display\" to see current list of code numbers."],
|
134
|
+
].map do |name, min, short_help, long_help|
|
135
|
+
SubcmdStruct.new(name, min, short_help, long_help)
|
136
|
+
end unless defined?(Subcommands)
|
137
|
+
|
138
|
+
def regexp
|
139
|
+
/^\s* dis(?:able)? (?:\s+(.*))?$/ix
|
140
|
+
end
|
141
|
+
|
142
|
+
def execute
|
143
|
+
if not @match[1]
|
144
|
+
errmsg "\"disable\" must be followed \"display\", \"breakpoints\"" +
|
145
|
+
" or breakpoint numbers.\n"
|
146
|
+
else
|
147
|
+
args = @match[1].split(/[ \t]+/)
|
148
|
+
param = args.shift
|
149
|
+
subcmd = find(Subcommands, param)
|
150
|
+
if subcmd
|
151
|
+
send("disable_#{subcmd.name}", args)
|
152
|
+
else
|
153
|
+
send("disable_breakpoints", args.unshift(param))
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def disable_breakpoints(args)
|
159
|
+
enable_disable_breakpoints("Disable", args)
|
160
|
+
end
|
161
|
+
|
162
|
+
def disable_display(args)
|
163
|
+
enable_disable_display("Disable", args)
|
164
|
+
end
|
165
|
+
|
166
|
+
class << self
|
167
|
+
def help_command
|
168
|
+
'disable'
|
169
|
+
end
|
170
|
+
|
171
|
+
def help(args)
|
172
|
+
if args[1]
|
173
|
+
s = args[1]
|
174
|
+
subcmd = Subcommands.find do |try_subcmd|
|
175
|
+
(s.size >= try_subcmd.min) and
|
176
|
+
(try_subcmd.name[0..s.size-1] == s)
|
177
|
+
end
|
178
|
+
if subcmd
|
179
|
+
str = subcmd.short_help + '.'
|
180
|
+
str += "\n" + subcmd.long_help if subcmd.long_help
|
181
|
+
return str
|
182
|
+
else
|
183
|
+
return "Invalid 'disable' subcommand '#{args[1]}'."
|
184
|
+
end
|
185
|
+
end
|
186
|
+
s = %{
|
187
|
+
Disable some things.
|
188
|
+
|
189
|
+
A disabled item is not forgotten, but has no effect until reenabled.
|
190
|
+
Use the "enable" command to have it take effect again.
|
191
|
+
--
|
192
|
+
List of disable subcommands:
|
193
|
+
--
|
194
|
+
}
|
195
|
+
for subcmd in Subcommands do
|
196
|
+
s += "disable #{subcmd.name} -- #{subcmd.short_help}\n"
|
197
|
+
end
|
198
|
+
return s
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
end # module Debugger
|
@@ -0,0 +1,168 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.7 //
|
7
|
+
AddBreakpoint breakpoints.rb /^ class AddBreakpoint < Command # :nodoc:$/;" c class:Debugger
|
8
|
+
BreakpointsCommand breakpoints.rb /^ class BreakpointsCommand < Command # :nodoc:$/;" c
|
9
|
+
CatchCommand catchpoint.rb /^ class CatchCommand < Command # :nodoc:$/;" c class:Debugger
|
10
|
+
ConditionCommand condition.rb /^ class ConditionCommand < Command # :nodoc:$/;" c class:Debugger
|
11
|
+
ContinueCommand stepping.rb /^ class ContinueCommand < Command # :nodoc:$/;" c
|
12
|
+
Debugger breakpoints.rb /^module Debugger$/;" m
|
13
|
+
Debugger catchpoint.rb /^module Debugger$/;" m
|
14
|
+
Debugger condition.rb /^module Debugger$/;" m
|
15
|
+
Debugger control.rb /^module Debugger$/;" m
|
16
|
+
Debugger eval.rb /^module Debugger$/;" m
|
17
|
+
Debugger frame.rb /^module Debugger$/;" m
|
18
|
+
Debugger inspect.rb /^module Debugger$/;" m
|
19
|
+
Debugger load.rb /^module Debugger$/;" m
|
20
|
+
Debugger stepping.rb /^module Debugger$/;" m
|
21
|
+
Debugger threads.rb /^module Debugger$/;" m
|
22
|
+
Debugger variables.rb /^module Debugger$/;" m
|
23
|
+
DeleteBreakpointCommand breakpoints.rb /^ class DeleteBreakpointCommand < Command # :nodoc:$/;" c
|
24
|
+
DownCommand frame.rb /^ class DownCommand < Command # :nodoc:$/;" c
|
25
|
+
EvalCommand eval.rb /^ class EvalCommand < Command # :nodoc:$/;" c class:Debugger
|
26
|
+
FinishCommand stepping.rb /^ class FinishCommand < Command # :nodoc:$/;" c
|
27
|
+
FrameCommand frame.rb /^ class FrameCommand < Command # :nodoc:$/;" c
|
28
|
+
FrameFunctions frame.rb /^ module FrameFunctions # :nodoc:$/;" m class:Debugger
|
29
|
+
InspectCommand inspect.rb /^ class InspectCommand < Command$/;" c class:Debugger
|
30
|
+
InterruptCommand control.rb /^ class InterruptCommand < Command # :nodoc:$/;" c
|
31
|
+
LoadCommand load.rb /^ class LoadCommand < Command $/;" c class:Debugger
|
32
|
+
NextCommand stepping.rb /^ class NextCommand < Command # :nodoc:$/;" c class:Debugger
|
33
|
+
PPCommand eval.rb /^ class PPCommand < Command # :nodoc:$/;" c
|
34
|
+
QuitCommand control.rb /^ class QuitCommand < Command # :nodoc:$/;" c class:Debugger
|
35
|
+
RestartCommand control.rb /^ class RestartCommand < Command # :nodoc:$/;" c
|
36
|
+
StartCommand control.rb /^ class StartCommand < Command # :nodoc:$/;" c
|
37
|
+
StepCommand stepping.rb /^ class StepCommand < Command # :nodoc:$/;" c
|
38
|
+
ThreadCurrentCommand threads.rb /^ class ThreadCurrentCommand < Command # :nodoc:$/;" c
|
39
|
+
ThreadListCommand threads.rb /^ class ThreadListCommand < Command # :nodoc:$/;" c class:Debugger
|
40
|
+
ThreadResumeCommand threads.rb /^ class ThreadResumeCommand < Command # :nodoc:$/;" c
|
41
|
+
ThreadStopCommand threads.rb /^ class ThreadStopCommand < Command # :nodoc:$/;" c
|
42
|
+
ThreadSwitchCommand threads.rb /^ class ThreadSwitchCommand < Command # :nodoc:$/;" c
|
43
|
+
UpCommand frame.rb /^ class UpCommand < Command # :nodoc:$/;" c
|
44
|
+
VarConstantCommand variables.rb /^ class VarConstantCommand < Command # :nodoc:$/;" c class:Debugger
|
45
|
+
VarGlobalCommand variables.rb /^ class VarGlobalCommand < Command # :nodoc:$/;" c
|
46
|
+
VarInstanceCommand variables.rb /^ class VarInstanceCommand < Command # :nodoc:$/;" c
|
47
|
+
VarLocalCommand variables.rb /^ class VarLocalCommand < Command # :nodoc:$/;" c
|
48
|
+
WhereCommand frame.rb /^ class WhereCommand < Command # :nodoc:$/;" c class:Debugger
|
49
|
+
adjust_frame frame.rb /^ def adjust_frame(frame_pos, absolute)$/;" f class:Debugger.FrameFunctions
|
50
|
+
clear_references inspect.rb /^ def self.clear_references$/;" F class:Debugger.InspectCommand
|
51
|
+
execute breakpoints.rb /^ def execute$/;" f class:BreakpointsCommand
|
52
|
+
execute breakpoints.rb /^ def execute$/;" f class:Debugger.AddBreakpoint
|
53
|
+
execute breakpoints.rb /^ def execute$/;" f class:DeleteBreakpointCommand
|
54
|
+
execute catchpoint.rb /^ def execute$/;" f class:Debugger.CatchCommand
|
55
|
+
execute condition.rb /^ def execute$/;" f class:Debugger.ConditionCommand
|
56
|
+
execute control.rb /^ def execute$/;" f class:Debugger.QuitCommand
|
57
|
+
execute control.rb /^ def execute$/;" f class:InterruptCommand
|
58
|
+
execute control.rb /^ def execute$/;" f class:RestartCommand
|
59
|
+
execute control.rb /^ def execute$/;" f class:StartCommand
|
60
|
+
execute eval.rb /^ def execute$/;" f class:Debugger.EvalCommand
|
61
|
+
execute eval.rb /^ def execute$/;" f class:PPCommand
|
62
|
+
execute frame.rb /^ def execute$/;" f class:Debugger.WhereCommand
|
63
|
+
execute frame.rb /^ def execute$/;" f class:DownCommand
|
64
|
+
execute frame.rb /^ def execute$/;" f class:FrameCommand
|
65
|
+
execute frame.rb /^ def execute$/;" f class:UpCommand
|
66
|
+
execute inspect.rb /^ def execute$/;" f class:Debugger.InspectCommand
|
67
|
+
execute load.rb /^ def execute$/;" f class:Debugger.LoadCommand
|
68
|
+
execute stepping.rb /^ def execute$/;" f class:ContinueCommand
|
69
|
+
execute stepping.rb /^ def execute$/;" f class:Debugger.NextCommand
|
70
|
+
execute stepping.rb /^ def execute$/;" f class:FinishCommand
|
71
|
+
execute stepping.rb /^ def execute$/;" f class:StepCommand
|
72
|
+
execute threads.rb /^ def execute$/;" f class:Debugger.ThreadListCommand
|
73
|
+
execute threads.rb /^ def execute$/;" f class:ThreadCurrentCommand
|
74
|
+
execute threads.rb /^ def execute$/;" f class:ThreadResumeCommand
|
75
|
+
execute threads.rb /^ def execute$/;" f class:ThreadStopCommand
|
76
|
+
execute threads.rb /^ def execute$/;" f class:ThreadSwitchCommand
|
77
|
+
execute variables.rb /^ def execute$/;" f class:Debugger.VarConstantCommand
|
78
|
+
execute variables.rb /^ def execute$/;" f class:VarGlobalCommand
|
79
|
+
execute variables.rb /^ def execute$/;" f class:VarInstanceCommand
|
80
|
+
execute variables.rb /^ def execute$/;" f class:VarLocalCommand
|
81
|
+
help breakpoints.rb /^ def help(cmd)$/;" f class:BreakpointsCommand
|
82
|
+
help breakpoints.rb /^ def help(cmd)$/;" f class:Debugger.AddBreakpoint
|
83
|
+
help breakpoints.rb /^ def help(cmd)$/;" f class:DeleteBreakpointCommand
|
84
|
+
help catchpoint.rb /^ def help(cmd)$/;" f class:Debugger.CatchCommand
|
85
|
+
help condition.rb /^ def help(cmd)$/;" f class:Debugger.ConditionCommand
|
86
|
+
help control.rb /^ def help(cmd)$/;" f class:Debugger.QuitCommand
|
87
|
+
help control.rb /^ def help(cmd)$/;" f class:InterruptCommand
|
88
|
+
help control.rb /^ def help(cmd)$/;" f class:RestartCommand
|
89
|
+
help control.rb /^ def help(cmd)$/;" f class:StartCommand
|
90
|
+
help eval.rb /^ def help(cmd)$/;" f class:Debugger.EvalCommand
|
91
|
+
help eval.rb /^ def help(cmd)$/;" f class:PPCommand
|
92
|
+
help frame.rb /^ def help(cmd)$/;" f class:Debugger.WhereCommand
|
93
|
+
help frame.rb /^ def help(cmd)$/;" f class:DownCommand
|
94
|
+
help frame.rb /^ def help(cmd)$/;" f class:FrameCommand
|
95
|
+
help frame.rb /^ def help(cmd)$/;" f class:UpCommand
|
96
|
+
help stepping.rb /^ def help(cmd)$/;" f class:ContinueCommand
|
97
|
+
help stepping.rb /^ def help(cmd)$/;" f class:Debugger.NextCommand
|
98
|
+
help stepping.rb /^ def help(cmd)$/;" f class:FinishCommand
|
99
|
+
help stepping.rb /^ def help(cmd)$/;" f class:StepCommand
|
100
|
+
help threads.rb /^ def help(cmd)$/;" f class:Debugger.ThreadListCommand
|
101
|
+
help threads.rb /^ def help(cmd)$/;" f class:ThreadCurrentCommand
|
102
|
+
help threads.rb /^ def help(cmd)$/;" f class:ThreadResumeCommand
|
103
|
+
help threads.rb /^ def help(cmd)$/;" f class:ThreadStopCommand
|
104
|
+
help threads.rb /^ def help(cmd)$/;" f class:ThreadSwitchCommand
|
105
|
+
help variables.rb /^ def help(cmd)$/;" f
|
106
|
+
help variables.rb /^ def help(cmd)$/;" f class:Debugger
|
107
|
+
help variables.rb /^ def help(cmd)$/;" f class:VarGlobalCommand
|
108
|
+
help variables.rb /^ def help(cmd)$/;" f class:VarLocalCommand
|
109
|
+
help_command breakpoints.rb /^ def help_command$/;" f class:BreakpointsCommand
|
110
|
+
help_command breakpoints.rb /^ def help_command$/;" f class:Debugger.AddBreakpoint
|
111
|
+
help_command breakpoints.rb /^ def help_command$/;" f class:DeleteBreakpointCommand
|
112
|
+
help_command catchpoint.rb /^ def help_command$/;" f class:Debugger.CatchCommand
|
113
|
+
help_command condition.rb /^ def help_command$/;" f class:Debugger.ConditionCommand
|
114
|
+
help_command control.rb /^ def help_command$/;" f class:Debugger.QuitCommand
|
115
|
+
help_command control.rb /^ def help_command$/;" f class:InterruptCommand
|
116
|
+
help_command control.rb /^ def help_command$/;" f class:RestartCommand
|
117
|
+
help_command control.rb /^ def help_command$/;" f class:StartCommand
|
118
|
+
help_command eval.rb /^ def help_command$/;" f class:Debugger.EvalCommand
|
119
|
+
help_command eval.rb /^ def help_command$/;" f class:PPCommand
|
120
|
+
help_command frame.rb /^ def help_command$/;" f class:Debugger.WhereCommand
|
121
|
+
help_command frame.rb /^ def help_command$/;" f class:DownCommand
|
122
|
+
help_command frame.rb /^ def help_command$/;" f class:FrameCommand
|
123
|
+
help_command frame.rb /^ def help_command$/;" f class:UpCommand
|
124
|
+
help_command stepping.rb /^ def help_command$/;" f class:ContinueCommand
|
125
|
+
help_command stepping.rb /^ def help_command$/;" f class:Debugger.NextCommand
|
126
|
+
help_command stepping.rb /^ def help_command$/;" f class:FinishCommand
|
127
|
+
help_command stepping.rb /^ def help_command$/;" f class:StepCommand
|
128
|
+
help_command threads.rb /^ def help_command$/;" f class:Debugger.ThreadListCommand
|
129
|
+
help_command threads.rb /^ def help_command$/;" f class:ThreadCurrentCommand
|
130
|
+
help_command threads.rb /^ def help_command$/;" f class:ThreadResumeCommand
|
131
|
+
help_command threads.rb /^ def help_command$/;" f class:ThreadStopCommand
|
132
|
+
help_command threads.rb /^ def help_command$/;" f class:ThreadSwitchCommand
|
133
|
+
help_command variables.rb /^ def help_command$/;" f
|
134
|
+
help_command variables.rb /^ def help_command$/;" f class:Debugger
|
135
|
+
help_command variables.rb /^ def help_command$/;" f class:VarGlobalCommand
|
136
|
+
help_command variables.rb /^ def help_command$/;" f class:VarLocalCommand
|
137
|
+
match eval.rb /^ def match(input)$/;" f class:Debugger.EvalCommand
|
138
|
+
reference_result inspect.rb /^ def self.reference_result(result)$/;" F class:Debugger.InspectCommand
|
139
|
+
regexp breakpoints.rb /^ def regexp$/;" f class:BreakpointsCommand
|
140
|
+
regexp breakpoints.rb /^ def regexp$/;" f class:Debugger.AddBreakpoint
|
141
|
+
regexp breakpoints.rb /^ def regexp$/;" f class:DeleteBreakpointCommand
|
142
|
+
regexp catchpoint.rb /^ def regexp$/;" f class:Debugger.CatchCommand
|
143
|
+
regexp condition.rb /^ def regexp$/;" f class:Debugger.ConditionCommand
|
144
|
+
regexp control.rb /^ def regexp$/;" f class:Debugger.QuitCommand
|
145
|
+
regexp control.rb /^ def regexp$/;" f class:InterruptCommand
|
146
|
+
regexp control.rb /^ def regexp$/;" f class:RestartCommand
|
147
|
+
regexp control.rb /^ def regexp$/;" f class:StartCommand
|
148
|
+
regexp eval.rb /^ def regexp$/;" f class:Debugger.EvalCommand
|
149
|
+
regexp eval.rb /^ def regexp$/;" f class:PPCommand
|
150
|
+
regexp frame.rb /^ def regexp$/;" f class:Debugger.WhereCommand
|
151
|
+
regexp frame.rb /^ def regexp$/;" f class:DownCommand
|
152
|
+
regexp frame.rb /^ def regexp$/;" f class:FrameCommand
|
153
|
+
regexp frame.rb /^ def regexp$/;" f class:UpCommand
|
154
|
+
regexp inspect.rb /^ def regexp$/;" f class:Debugger.InspectCommand
|
155
|
+
regexp load.rb /^ def regexp$/;" f class:Debugger.LoadCommand
|
156
|
+
regexp stepping.rb /^ def regexp$/;" f class:ContinueCommand
|
157
|
+
regexp stepping.rb /^ def regexp$/;" f class:Debugger.NextCommand
|
158
|
+
regexp stepping.rb /^ def regexp$/;" f class:FinishCommand
|
159
|
+
regexp stepping.rb /^ def regexp$/;" f class:StepCommand
|
160
|
+
regexp threads.rb /^ def regexp$/;" f class:Debugger.ThreadListCommand
|
161
|
+
regexp threads.rb /^ def regexp$/;" f class:ThreadCurrentCommand
|
162
|
+
regexp threads.rb /^ def regexp$/;" f class:ThreadResumeCommand
|
163
|
+
regexp threads.rb /^ def regexp$/;" f class:ThreadStopCommand
|
164
|
+
regexp threads.rb /^ def regexp$/;" f class:ThreadSwitchCommand
|
165
|
+
regexp variables.rb /^ def regexp$/;" f class:Debugger.VarConstantCommand
|
166
|
+
regexp variables.rb /^ def regexp$/;" f class:VarGlobalCommand
|
167
|
+
regexp variables.rb /^ def regexp$/;" f class:VarInstanceCommand
|
168
|
+
regexp variables.rb /^ def regexp$/;" f class:VarLocalCommand
|
@@ -9,11 +9,14 @@
|
|
9
9
|
@printer = XmlPrinter.new(interface)
|
10
10
|
@line = nil
|
11
11
|
@file = nil
|
12
|
+
@last_breakpoint = nil
|
12
13
|
end
|
13
14
|
|
14
15
|
def at_breakpoint(context, breakpoint)
|
15
|
-
|
16
|
-
|
16
|
+
raise "@last_breakpoint supposed to be nil. is #{@last_breakpoint}" if @last_breakpoint
|
17
|
+
# at_breakpoint is immediately followed by #at_line event in
|
18
|
+
# ruby-debug-base. So postpone breakpoint printing until #at_line.
|
19
|
+
@last_breakpoint = breakpoint
|
17
20
|
end
|
18
21
|
|
19
22
|
def at_catchpoint(context, excpt)
|
@@ -26,14 +29,35 @@
|
|
26
29
|
|
27
30
|
def at_line(context, file, line)
|
28
31
|
@printer.print_at_line(file, line) if context.nil? || context.stop_reason == :step
|
29
|
-
|
30
|
-
|
32
|
+
line_event(context, file, line)
|
33
|
+
end
|
34
|
+
|
35
|
+
def at_return(context, file, line)
|
36
|
+
@printer.print_at_line(file, line)
|
37
|
+
context.stop_frame = -1
|
38
|
+
line_event(context, file, line)
|
39
|
+
end
|
40
|
+
|
41
|
+
def line_event(context, file, line)
|
42
|
+
@line = line
|
43
|
+
@file = file
|
31
44
|
@context = context
|
45
|
+
if @last_breakpoint
|
46
|
+
# followed after #at_breakpoint in the same thread. Print breakpoint
|
47
|
+
# now when @line, @file and @context are correctly set to prevent race
|
48
|
+
# condition with `control thread'.
|
49
|
+
n = Debugger.breakpoints.index(@last_breakpoint) + 1
|
50
|
+
@printer.print_breakpoint n, @last_breakpoint
|
51
|
+
@last_breakpoint = nil
|
52
|
+
end
|
53
|
+
raise "DebuggerThread are not supposed to be traced (#{context.thread})" if context.thread.is_a?(Debugger::DebugThread)
|
32
54
|
@printer.print_debug("Stopping Thread %s", context.thread.to_s)
|
33
55
|
@printer.print_debug("Threads equal: %s", Thread.current == context.thread)
|
56
|
+
# will be resumed by commands like `step', `next', `continue', `finish'
|
57
|
+
# from `control thread'
|
34
58
|
Thread.stop
|
35
59
|
@printer.print_debug("Resumed Thread %s", context.thread.to_s)
|
36
|
-
@line=nil
|
60
|
+
@line = nil
|
37
61
|
@file = nil
|
38
62
|
@context = nil
|
39
63
|
end
|
@@ -41,5 +65,6 @@
|
|
41
65
|
def at_line?
|
42
66
|
@line
|
43
67
|
end
|
68
|
+
|
44
69
|
end
|
45
|
-
end
|
70
|
+
end
|
data/lib/ruby-debug/helper.rb
CHANGED
data/lib/ruby-debug/processor.rb
CHANGED
@@ -15,15 +15,15 @@ module Debugger
|
|
15
15
|
|
16
16
|
def process_commands
|
17
17
|
@printer.print_debug("Starting command read loop")
|
18
|
-
|
19
|
-
state = ControlState.new(@interface
|
20
|
-
|
18
|
+
ctrl_cmd_classes = Command.commands.select{|cmd| cmd.control}
|
19
|
+
state = ControlState.new(@interface)
|
20
|
+
ctrl_cmds = ctrl_cmd_classes.map{|cmd| cmd.new(state, @printer)}
|
21
21
|
|
22
22
|
while input = @interface.read_command
|
23
23
|
# escape % since print_debug might use printf
|
24
24
|
@printer.print_debug "Processing: #{input.gsub('%', '%%')}"
|
25
25
|
catch(:debug_error) do
|
26
|
-
if cmd =
|
26
|
+
if cmd = ctrl_cmds.find{|c| c.match(input) }
|
27
27
|
cmd.execute
|
28
28
|
else
|
29
29
|
process_context_commands(input)
|
@@ -33,35 +33,33 @@ module Debugger
|
|
33
33
|
rescue IOError, Errno::EPIPE
|
34
34
|
rescue Exception
|
35
35
|
@printer.print_error "INTERNAL ERROR!!! #{$!}\n" rescue nil
|
36
|
-
|
36
|
+
@printer.print_error $!.backtrace.map{|l| "\t#{l}"}.join("\n") rescue nil
|
37
37
|
ensure
|
38
38
|
@interface.close
|
39
39
|
end
|
40
40
|
|
41
41
|
def process_context_commands(input)
|
42
42
|
unless Debugger.event_processor.at_line?
|
43
|
-
@printer.print_error "There is no thread suspended at the time and therefore no context to execute '#{input.gsub('%', '%%')}'"
|
43
|
+
@printer.print_error "There is no thread suspended at the time and therefore no context to execute '#{input.gsub('%', '%%')}'"
|
44
44
|
return
|
45
45
|
end
|
46
46
|
context = Debugger.event_processor.context
|
47
47
|
file = Debugger.event_processor.file
|
48
|
-
line = Debugger.event_processor.line
|
49
|
-
|
48
|
+
line = Debugger.event_processor.line
|
49
|
+
event_cmds_classes = Command.commands.select{|cmd| cmd.event}
|
50
50
|
state = State.new do |s|
|
51
51
|
s.context = context
|
52
52
|
s.file = file
|
53
53
|
s.line = line
|
54
54
|
s.binding = context.frame_binding(0)
|
55
55
|
s.interface = @interface
|
56
|
-
s.commands = event_cmds
|
57
56
|
end
|
58
|
-
|
57
|
+
event_cmds = event_cmds_classes.map{|cmd| cmd.new(state, @printer) }
|
59
58
|
catch(:debug_error) do
|
60
|
-
|
61
59
|
splitter[input].each do |input|
|
62
60
|
# escape % since print_debug might use printf
|
63
61
|
@printer.print_debug "Processing context: #{input.gsub('%', '%%')}"
|
64
|
-
if cmd =
|
62
|
+
if cmd = event_cmds.find{ |c| c.match(input) }
|
65
63
|
if context.dead? && cmd.class.need_context
|
66
64
|
@printer.print_msg "Command is unavailable\n"
|
67
65
|
else
|
@@ -93,11 +91,13 @@ module Debugger
|
|
93
91
|
end
|
94
92
|
end
|
95
93
|
end
|
96
|
-
end
|
94
|
+
end
|
95
|
+
|
97
96
|
class State # :nodoc:
|
97
|
+
|
98
98
|
attr_accessor :context, :file, :line, :binding
|
99
99
|
attr_accessor :frame_pos, :previous_line
|
100
|
-
attr_accessor :interface
|
100
|
+
attr_accessor :interface
|
101
101
|
|
102
102
|
def initialize
|
103
103
|
@frame_pos = 0
|
@@ -120,10 +120,9 @@ module Debugger
|
|
120
120
|
end
|
121
121
|
|
122
122
|
class ControlState # :nodoc:
|
123
|
-
|
124
|
-
def initialize(interface
|
123
|
+
|
124
|
+
def initialize(interface)
|
125
125
|
@interface = interface
|
126
|
-
@commands = commands
|
127
126
|
end
|
128
127
|
|
129
128
|
def proceed
|
data/lib/ruby-debug/tags
ADDED
@@ -0,0 +1,260 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.7 //
|
7
|
+
AddBreakpoint commands/breakpoints.rb /^ class AddBreakpoint < Command # :nodoc:$/;" c class:Debugger
|
8
|
+
BreakpointsCommand commands/breakpoints.rb /^ class BreakpointsCommand < Command # :nodoc:$/;" c
|
9
|
+
CatchCommand commands/catchpoint.rb /^ class CatchCommand < Command # :nodoc:$/;" c class:Debugger
|
10
|
+
Command command.rb /^ class Command # :nodoc:$/;" c class:Debugger
|
11
|
+
ConditionCommand commands/condition.rb /^ class ConditionCommand < Command # :nodoc:$/;" c class:Debugger
|
12
|
+
ContinueCommand commands/stepping.rb /^ class ContinueCommand < Command # :nodoc:$/;" c
|
13
|
+
ControlCommandProcessor processor.rb /^ class ControlCommandProcessor # :nodoc:$/;" c class:Debugger
|
14
|
+
ControlState processor.rb /^ class ControlState # :nodoc:$/;" c class:Debugger
|
15
|
+
Debugger command.rb /^module Debugger$/;" m
|
16
|
+
Debugger commands/breakpoints.rb /^module Debugger$/;" m
|
17
|
+
Debugger commands/catchpoint.rb /^module Debugger$/;" m
|
18
|
+
Debugger commands/condition.rb /^module Debugger$/;" m
|
19
|
+
Debugger commands/control.rb /^module Debugger$/;" m
|
20
|
+
Debugger commands/eval.rb /^module Debugger$/;" m
|
21
|
+
Debugger commands/frame.rb /^module Debugger$/;" m
|
22
|
+
Debugger commands/inspect.rb /^module Debugger$/;" m
|
23
|
+
Debugger commands/load.rb /^module Debugger$/;" m
|
24
|
+
Debugger commands/stepping.rb /^module Debugger$/;" m
|
25
|
+
Debugger commands/threads.rb /^module Debugger$/;" m
|
26
|
+
Debugger commands/variables.rb /^module Debugger$/;" m
|
27
|
+
Debugger event_processor.rb /^ module Debugger$/;" m
|
28
|
+
Debugger helper.rb /^module Debugger$/;" m
|
29
|
+
Debugger interface.rb /^module Debugger $/;" m
|
30
|
+
Debugger processor.rb /^module Debugger$/;" m
|
31
|
+
Debugger xml_printer.rb /^module Debugger$/;" m
|
32
|
+
DeleteBreakpointCommand commands/breakpoints.rb /^ class DeleteBreakpointCommand < Command # :nodoc:$/;" c
|
33
|
+
DownCommand commands/frame.rb /^ class DownCommand < Command # :nodoc:$/;" c
|
34
|
+
EvalCommand commands/eval.rb /^ class EvalCommand < Command # :nodoc:$/;" c class:Debugger
|
35
|
+
EventProcessor event_processor.rb /^ class EventProcessor$/;" c class:Debugger
|
36
|
+
FinishCommand commands/stepping.rb /^ class FinishCommand < Command # :nodoc:$/;" c
|
37
|
+
FrameCommand commands/frame.rb /^ class FrameCommand < Command # :nodoc:$/;" c
|
38
|
+
FrameFunctions commands/frame.rb /^ module FrameFunctions # :nodoc:$/;" m class:Debugger
|
39
|
+
InspectCommand commands/inspect.rb /^ class InspectCommand < Command$/;" c class:Debugger
|
40
|
+
InterruptCommand commands/control.rb /^ class InterruptCommand < Command # :nodoc:$/;" c
|
41
|
+
LoadCommand commands/load.rb /^ class LoadCommand < Command $/;" c class:Debugger
|
42
|
+
NextCommand commands/stepping.rb /^ class NextCommand < Command # :nodoc:$/;" c class:Debugger
|
43
|
+
PPCommand commands/eval.rb /^ class PPCommand < Command # :nodoc:$/;" c
|
44
|
+
ParseFunctions helper.rb /^ module ParseFunctions$/;" m class:Debugger
|
45
|
+
QuitCommand commands/control.rb /^ class QuitCommand < Command # :nodoc:$/;" c class:Debugger
|
46
|
+
RemoteInterface interface.rb /^ class RemoteInterface # :nodoc:$/;" c class:Debugger
|
47
|
+
RestartCommand commands/control.rb /^ class RestartCommand < Command # :nodoc:$/;" c
|
48
|
+
StartCommand commands/control.rb /^ class StartCommand < Command # :nodoc:$/;" c
|
49
|
+
State processor.rb /^ class State # :nodoc:$/;" c class:Debugger
|
50
|
+
StepCommand commands/stepping.rb /^ class StepCommand < Command # :nodoc:$/;" c
|
51
|
+
TCPSocket interface.rb /^class TCPSocket$/;" c
|
52
|
+
ThreadCurrentCommand commands/threads.rb /^ class ThreadCurrentCommand < Command # :nodoc:$/;" c
|
53
|
+
ThreadListCommand commands/threads.rb /^ class ThreadListCommand < Command # :nodoc:$/;" c class:Debugger
|
54
|
+
ThreadResumeCommand commands/threads.rb /^ class ThreadResumeCommand < Command # :nodoc:$/;" c
|
55
|
+
ThreadStopCommand commands/threads.rb /^ class ThreadStopCommand < Command # :nodoc:$/;" c
|
56
|
+
ThreadSwitchCommand commands/threads.rb /^ class ThreadSwitchCommand < Command # :nodoc:$/;" c
|
57
|
+
UpCommand commands/frame.rb /^ class UpCommand < Command # :nodoc:$/;" c
|
58
|
+
VarConstantCommand commands/variables.rb /^ class VarConstantCommand < Command # :nodoc:$/;" c class:Debugger
|
59
|
+
VarGlobalCommand commands/variables.rb /^ class VarGlobalCommand < Command # :nodoc:$/;" c
|
60
|
+
VarInstanceCommand commands/variables.rb /^ class VarInstanceCommand < Command # :nodoc:$/;" c
|
61
|
+
VarLocalCommand commands/variables.rb /^ class VarLocalCommand < Command # :nodoc:$/;" c
|
62
|
+
WhereCommand commands/frame.rb /^ class WhereCommand < Command # :nodoc:$/;" c class:Debugger
|
63
|
+
XmlPrinter xml_printer.rb /^ class XmlPrinter # :nodoc:$/;" c class:Debugger
|
64
|
+
adjust_frame commands/frame.rb /^ def adjust_frame(frame_pos, absolute)$/;" f class:Debugger.FrameFunctions
|
65
|
+
at_breakpoint event_processor.rb /^ def at_breakpoint(context, breakpoint)$/;" f class:Debugger.EventProcessor
|
66
|
+
at_catchpoint event_processor.rb /^ def at_catchpoint(context, excpt)$/;" f class:Debugger.EventProcessor
|
67
|
+
at_line event_processor.rb /^ def at_line(context, file, line)$/;" f class:Debugger.EventProcessor
|
68
|
+
at_line? event_processor.rb /^ def at_line?$/;" f class:Debugger.EventProcessor
|
69
|
+
at_return event_processor.rb /^ def at_return(context, file, line)$/;" f class:Debugger.EventProcessor
|
70
|
+
at_tracing event_processor.rb /^ def at_tracing(context, file, line)$/;" f class:Debugger.EventProcessor
|
71
|
+
clear_references commands/inspect.rb /^ def self.clear_references$/;" F class:Debugger.InspectCommand
|
72
|
+
close interface.rb /^ def close$/;" f class:Debugger.RemoteInterface
|
73
|
+
commands command.rb /^ def commands$/;" f class:Debugger.Command
|
74
|
+
context processor.rb /^ def context$/;" f class:Debugger.ControlState
|
75
|
+
debug_eval command.rb /^ def debug_eval(str, b = get_binding)$/;" f class:Debugger
|
76
|
+
debug_silent_eval command.rb /^ def debug_silent_eval(str)$/;" f class:Debugger
|
77
|
+
errmsg command.rb /^ def errmsg(*args)$/;" f class:Debugger
|
78
|
+
execute commands/breakpoints.rb /^ def execute$/;" f class:BreakpointsCommand
|
79
|
+
execute commands/breakpoints.rb /^ def execute$/;" f class:Debugger.AddBreakpoint
|
80
|
+
execute commands/breakpoints.rb /^ def execute$/;" f class:DeleteBreakpointCommand
|
81
|
+
execute commands/catchpoint.rb /^ def execute$/;" f class:Debugger.CatchCommand
|
82
|
+
execute commands/condition.rb /^ def execute$/;" f class:Debugger.ConditionCommand
|
83
|
+
execute commands/control.rb /^ def execute$/;" f class:Debugger.QuitCommand
|
84
|
+
execute commands/control.rb /^ def execute$/;" f class:InterruptCommand
|
85
|
+
execute commands/control.rb /^ def execute$/;" f class:RestartCommand
|
86
|
+
execute commands/control.rb /^ def execute$/;" f class:StartCommand
|
87
|
+
execute commands/eval.rb /^ def execute$/;" f class:Debugger.EvalCommand
|
88
|
+
execute commands/eval.rb /^ def execute$/;" f class:PPCommand
|
89
|
+
execute commands/frame.rb /^ def execute$/;" f class:Debugger.WhereCommand
|
90
|
+
execute commands/frame.rb /^ def execute$/;" f class:DownCommand
|
91
|
+
execute commands/frame.rb /^ def execute$/;" f class:FrameCommand
|
92
|
+
execute commands/frame.rb /^ def execute$/;" f class:UpCommand
|
93
|
+
execute commands/inspect.rb /^ def execute$/;" f class:Debugger.InspectCommand
|
94
|
+
execute commands/load.rb /^ def execute$/;" f class:Debugger.LoadCommand
|
95
|
+
execute commands/stepping.rb /^ def execute$/;" f class:ContinueCommand
|
96
|
+
execute commands/stepping.rb /^ def execute$/;" f class:Debugger.NextCommand
|
97
|
+
execute commands/stepping.rb /^ def execute$/;" f class:FinishCommand
|
98
|
+
execute commands/stepping.rb /^ def execute$/;" f class:StepCommand
|
99
|
+
execute commands/threads.rb /^ def execute$/;" f class:Debugger.ThreadListCommand
|
100
|
+
execute commands/threads.rb /^ def execute$/;" f class:ThreadCurrentCommand
|
101
|
+
execute commands/threads.rb /^ def execute$/;" f class:ThreadResumeCommand
|
102
|
+
execute commands/threads.rb /^ def execute$/;" f class:ThreadStopCommand
|
103
|
+
execute commands/threads.rb /^ def execute$/;" f class:ThreadSwitchCommand
|
104
|
+
execute commands/variables.rb /^ def execute$/;" f class:Debugger.VarConstantCommand
|
105
|
+
execute commands/variables.rb /^ def execute$/;" f class:VarGlobalCommand
|
106
|
+
execute commands/variables.rb /^ def execute$/;" f class:VarInstanceCommand
|
107
|
+
execute commands/variables.rb /^ def execute$/;" f class:VarLocalCommand
|
108
|
+
file processor.rb /^ def file$/;" f class:Debugger.ControlState
|
109
|
+
get_binding command.rb /^ def get_binding$/;" f class:Debugger
|
110
|
+
get_context command.rb /^ def get_context(thnum)$/;" f class:Debugger
|
111
|
+
get_int helper.rb /^ def get_int(str, cmd, min=nil, max=nil, default=1)$/;" f class:Debugger.ParseFunctions
|
112
|
+
hbinding command.rb /^ def hbinding(hash)$/;" f class:Debugger
|
113
|
+
help commands/breakpoints.rb /^ def help(cmd)$/;" f class:BreakpointsCommand
|
114
|
+
help commands/breakpoints.rb /^ def help(cmd)$/;" f class:Debugger.AddBreakpoint
|
115
|
+
help commands/breakpoints.rb /^ def help(cmd)$/;" f class:DeleteBreakpointCommand
|
116
|
+
help commands/catchpoint.rb /^ def help(cmd)$/;" f class:Debugger.CatchCommand
|
117
|
+
help commands/condition.rb /^ def help(cmd)$/;" f class:Debugger.ConditionCommand
|
118
|
+
help commands/control.rb /^ def help(cmd)$/;" f class:Debugger.QuitCommand
|
119
|
+
help commands/control.rb /^ def help(cmd)$/;" f class:InterruptCommand
|
120
|
+
help commands/control.rb /^ def help(cmd)$/;" f class:RestartCommand
|
121
|
+
help commands/control.rb /^ def help(cmd)$/;" f class:StartCommand
|
122
|
+
help commands/eval.rb /^ def help(cmd)$/;" f class:Debugger.EvalCommand
|
123
|
+
help commands/eval.rb /^ def help(cmd)$/;" f class:PPCommand
|
124
|
+
help commands/frame.rb /^ def help(cmd)$/;" f class:Debugger.WhereCommand
|
125
|
+
help commands/frame.rb /^ def help(cmd)$/;" f class:DownCommand
|
126
|
+
help commands/frame.rb /^ def help(cmd)$/;" f class:FrameCommand
|
127
|
+
help commands/frame.rb /^ def help(cmd)$/;" f class:UpCommand
|
128
|
+
help commands/stepping.rb /^ def help(cmd)$/;" f class:ContinueCommand
|
129
|
+
help commands/stepping.rb /^ def help(cmd)$/;" f class:Debugger.NextCommand
|
130
|
+
help commands/stepping.rb /^ def help(cmd)$/;" f class:FinishCommand
|
131
|
+
help commands/stepping.rb /^ def help(cmd)$/;" f class:StepCommand
|
132
|
+
help commands/threads.rb /^ def help(cmd)$/;" f class:Debugger.ThreadListCommand
|
133
|
+
help commands/threads.rb /^ def help(cmd)$/;" f class:ThreadCurrentCommand
|
134
|
+
help commands/threads.rb /^ def help(cmd)$/;" f class:ThreadResumeCommand
|
135
|
+
help commands/threads.rb /^ def help(cmd)$/;" f class:ThreadStopCommand
|
136
|
+
help commands/threads.rb /^ def help(cmd)$/;" f class:ThreadSwitchCommand
|
137
|
+
help commands/variables.rb /^ def help(cmd)$/;" f
|
138
|
+
help commands/variables.rb /^ def help(cmd)$/;" f class:Debugger
|
139
|
+
help commands/variables.rb /^ def help(cmd)$/;" f class:VarGlobalCommand
|
140
|
+
help commands/variables.rb /^ def help(cmd)$/;" f class:VarLocalCommand
|
141
|
+
help_command commands/breakpoints.rb /^ def help_command$/;" f class:BreakpointsCommand
|
142
|
+
help_command commands/breakpoints.rb /^ def help_command$/;" f class:Debugger.AddBreakpoint
|
143
|
+
help_command commands/breakpoints.rb /^ def help_command$/;" f class:DeleteBreakpointCommand
|
144
|
+
help_command commands/catchpoint.rb /^ def help_command$/;" f class:Debugger.CatchCommand
|
145
|
+
help_command commands/condition.rb /^ def help_command$/;" f class:Debugger.ConditionCommand
|
146
|
+
help_command commands/control.rb /^ def help_command$/;" f class:Debugger.QuitCommand
|
147
|
+
help_command commands/control.rb /^ def help_command$/;" f class:InterruptCommand
|
148
|
+
help_command commands/control.rb /^ def help_command$/;" f class:RestartCommand
|
149
|
+
help_command commands/control.rb /^ def help_command$/;" f class:StartCommand
|
150
|
+
help_command commands/eval.rb /^ def help_command$/;" f class:Debugger.EvalCommand
|
151
|
+
help_command commands/eval.rb /^ def help_command$/;" f class:PPCommand
|
152
|
+
help_command commands/frame.rb /^ def help_command$/;" f class:Debugger.WhereCommand
|
153
|
+
help_command commands/frame.rb /^ def help_command$/;" f class:DownCommand
|
154
|
+
help_command commands/frame.rb /^ def help_command$/;" f class:FrameCommand
|
155
|
+
help_command commands/frame.rb /^ def help_command$/;" f class:UpCommand
|
156
|
+
help_command commands/stepping.rb /^ def help_command$/;" f class:ContinueCommand
|
157
|
+
help_command commands/stepping.rb /^ def help_command$/;" f class:Debugger.NextCommand
|
158
|
+
help_command commands/stepping.rb /^ def help_command$/;" f class:FinishCommand
|
159
|
+
help_command commands/stepping.rb /^ def help_command$/;" f class:StepCommand
|
160
|
+
help_command commands/threads.rb /^ def help_command$/;" f class:Debugger.ThreadListCommand
|
161
|
+
help_command commands/threads.rb /^ def help_command$/;" f class:ThreadCurrentCommand
|
162
|
+
help_command commands/threads.rb /^ def help_command$/;" f class:ThreadResumeCommand
|
163
|
+
help_command commands/threads.rb /^ def help_command$/;" f class:ThreadStopCommand
|
164
|
+
help_command commands/threads.rb /^ def help_command$/;" f class:ThreadSwitchCommand
|
165
|
+
help_command commands/variables.rb /^ def help_command$/;" f
|
166
|
+
help_command commands/variables.rb /^ def help_command$/;" f class:Debugger
|
167
|
+
help_command commands/variables.rb /^ def help_command$/;" f class:VarGlobalCommand
|
168
|
+
help_command commands/variables.rb /^ def help_command$/;" f class:VarLocalCommand
|
169
|
+
inherited command.rb /^ def inherited(klass)$/;" f class:Debugger.Command
|
170
|
+
initialize command.rb /^ def initialize(state, printer)$/;" f class:Debugger
|
171
|
+
initialize event_processor.rb /^ def initialize(interface)$/;" f class:Debugger.EventProcessor
|
172
|
+
initialize interface.rb /^ def initialize(socket)$/;" f class:Debugger.RemoteInterface
|
173
|
+
initialize processor.rb /^ def initialize$/;" f class:Debugger.State
|
174
|
+
initialize processor.rb /^ def initialize(interface)$/;" f class:Debugger.ControlCommandProcessor
|
175
|
+
initialize processor.rb /^ def initialize(interface)$/;" f class:Debugger.ControlState
|
176
|
+
initialize xml_printer.rb /^ def initialize(interface)$/;" f class:Debugger.XmlPrinter
|
177
|
+
line_at command.rb /^ def line_at(file, line)$/;" f class:Debugger
|
178
|
+
line_event event_processor.rb /^ def line_event(context, file, line)$/;" f class:Debugger.EventProcessor
|
179
|
+
load_commands command.rb /^ def load_commands$/;" f class:Debugger.Command
|
180
|
+
match command.rb /^ def match(input)$/;" f class:Debugger
|
181
|
+
match commands/eval.rb /^ def match(input)$/;" f class:Debugger.EvalCommand
|
182
|
+
method_missing command.rb /^ def method_missing(meth, *args, &block)$/;" f class:Debugger.Command
|
183
|
+
method_missing command.rb /^ def method_missing(meth, *args, &block)$/;" f class:Debugger
|
184
|
+
non_blocking_gets interface.rb /^ def non_blocking_gets$/;" f class:TCPSocket
|
185
|
+
options command.rb /^ def options$/;" f class:Debugger.Command
|
186
|
+
print command.rb /^ def print(*args)$/;" f class:Debugger
|
187
|
+
print interface.rb /^ def print(*args)$/;" f class:Debugger.RemoteInterface
|
188
|
+
print processor.rb /^ def print(*args)$/;" f class:Debugger.ControlCommandProcessor
|
189
|
+
print processor.rb /^ def print(*args)$/;" f class:Debugger.ControlState
|
190
|
+
print processor.rb /^ def print(*args)$/;" f class:Debugger.State
|
191
|
+
print xml_printer.rb /^ def print(*params)$/;" f
|
192
|
+
print_array xml_printer.rb /^ def print_array(array)$/;" f
|
193
|
+
print_at_line xml_printer.rb /^ def print_at_line(file, line)$/;" f
|
194
|
+
print_breakpoint xml_printer.rb /^ def print_breakpoint(n, breakpoint)$/;" f
|
195
|
+
print_breakpoint_added xml_printer.rb /^ def print_breakpoint_added(b)$/;" f
|
196
|
+
print_breakpoint_deleted xml_printer.rb /^ def print_breakpoint_deleted(b)$/;" f
|
197
|
+
print_breakpoints xml_printer.rb /^ def print_breakpoints(breakpoints)$/;" f
|
198
|
+
print_catchpoint xml_printer.rb /^ def print_catchpoint(exception)$/;" f
|
199
|
+
print_contdition_set xml_printer.rb /^ def print_contdition_set(bp_id)$/;" f
|
200
|
+
print_context xml_printer.rb /^ def print_context(context)$/;" f
|
201
|
+
print_contexts xml_printer.rb /^ def print_contexts(contexts)$/;" f
|
202
|
+
print_current_frame xml_printer.rb /^ def print_current_frame(context, frame_pos)$/;" f
|
203
|
+
print_debug xml_printer.rb /^ def print_debug(*args)$/;" f class:Debugger
|
204
|
+
print_element xml_printer.rb /^ def print_element(name)$/;" f
|
205
|
+
print_error xml_printer.rb /^ def print_error(*args)$/;" f class:Debugger.XmlPrinter
|
206
|
+
print_eval xml_printer.rb /^ def print_eval(exp, value)$/;" f
|
207
|
+
print_exception xml_printer.rb /^ def print_exception(exception, binding)$/;" f
|
208
|
+
print_expression xml_printer.rb /^ def print_expression(exp, value, idx)$/;" f
|
209
|
+
print_expressions xml_printer.rb /^ def print_expressions(exps)$/;" f
|
210
|
+
print_frame xml_printer.rb /^ def print_frame(context, idx, cur_idx)$/;" f
|
211
|
+
print_frames xml_printer.rb /^ def print_frames(context, cur_idx)$/;" f class:Debugger
|
212
|
+
print_hash xml_printer.rb /^ def print_hash(hash)$/;" f
|
213
|
+
print_inspect xml_printer.rb /^ def print_inspect(eval_result)$/;" f
|
214
|
+
print_list xml_printer.rb /^ def print_list(b, e, file, line)$/;" f
|
215
|
+
print_load_result xml_printer.rb /^ def print_load_result(file, exception=nil)$/;" f
|
216
|
+
print_methods xml_printer.rb /^ def print_methods(methods)$/;" f
|
217
|
+
print_msg xml_printer.rb /^ def print_msg(*args)$/;" f class:Debugger.XmlPrinter
|
218
|
+
print_pp xml_printer.rb /^ def print_pp(exp, value)$/;" f
|
219
|
+
print_trace xml_printer.rb /^ def print_trace(context, file, line)$/;" f
|
220
|
+
print_variable xml_printer.rb /^ def print_variable(name, value, kind)$/;" f
|
221
|
+
print_variables xml_printer.rb /^ def print_variables(vars, kind)$/;" f
|
222
|
+
proceed processor.rb /^ def proceed$/;" f class:Debugger.ControlState
|
223
|
+
proceed processor.rb /^ def proceed$/;" f class:Debugger.State
|
224
|
+
proceed? processor.rb /^ def proceed?$/;" f class:Debugger.State
|
225
|
+
process_commands processor.rb /^ def process_commands$/;" f class:Debugger.ControlCommandProcessor
|
226
|
+
process_context_commands processor.rb /^ def process_context_commands(input)$/;" f class:Debugger.ControlCommandProcessor
|
227
|
+
read_command interface.rb /^ def read_command$/;" f class:Debugger.RemoteInterface
|
228
|
+
reference_result commands/inspect.rb /^ def self.reference_result(result)$/;" F class:Debugger.InspectCommand
|
229
|
+
regexp commands/breakpoints.rb /^ def regexp$/;" f class:BreakpointsCommand
|
230
|
+
regexp commands/breakpoints.rb /^ def regexp$/;" f class:Debugger.AddBreakpoint
|
231
|
+
regexp commands/breakpoints.rb /^ def regexp$/;" f class:DeleteBreakpointCommand
|
232
|
+
regexp commands/catchpoint.rb /^ def regexp$/;" f class:Debugger.CatchCommand
|
233
|
+
regexp commands/condition.rb /^ def regexp$/;" f class:Debugger.ConditionCommand
|
234
|
+
regexp commands/control.rb /^ def regexp$/;" f class:Debugger.QuitCommand
|
235
|
+
regexp commands/control.rb /^ def regexp$/;" f class:InterruptCommand
|
236
|
+
regexp commands/control.rb /^ def regexp$/;" f class:RestartCommand
|
237
|
+
regexp commands/control.rb /^ def regexp$/;" f class:StartCommand
|
238
|
+
regexp commands/eval.rb /^ def regexp$/;" f class:Debugger.EvalCommand
|
239
|
+
regexp commands/eval.rb /^ def regexp$/;" f class:PPCommand
|
240
|
+
regexp commands/frame.rb /^ def regexp$/;" f class:Debugger.WhereCommand
|
241
|
+
regexp commands/frame.rb /^ def regexp$/;" f class:DownCommand
|
242
|
+
regexp commands/frame.rb /^ def regexp$/;" f class:FrameCommand
|
243
|
+
regexp commands/frame.rb /^ def regexp$/;" f class:UpCommand
|
244
|
+
regexp commands/inspect.rb /^ def regexp$/;" f class:Debugger.InspectCommand
|
245
|
+
regexp commands/load.rb /^ def regexp$/;" f class:Debugger.LoadCommand
|
246
|
+
regexp commands/stepping.rb /^ def regexp$/;" f class:ContinueCommand
|
247
|
+
regexp commands/stepping.rb /^ def regexp$/;" f class:Debugger.NextCommand
|
248
|
+
regexp commands/stepping.rb /^ def regexp$/;" f class:FinishCommand
|
249
|
+
regexp commands/stepping.rb /^ def regexp$/;" f class:StepCommand
|
250
|
+
regexp commands/threads.rb /^ def regexp$/;" f class:Debugger.ThreadListCommand
|
251
|
+
regexp commands/threads.rb /^ def regexp$/;" f class:ThreadCurrentCommand
|
252
|
+
regexp commands/threads.rb /^ def regexp$/;" f class:ThreadResumeCommand
|
253
|
+
regexp commands/threads.rb /^ def regexp$/;" f class:ThreadStopCommand
|
254
|
+
regexp commands/threads.rb /^ def regexp$/;" f class:ThreadSwitchCommand
|
255
|
+
regexp commands/variables.rb /^ def regexp$/;" f class:Debugger.VarConstantCommand
|
256
|
+
regexp commands/variables.rb /^ def regexp$/;" f class:VarGlobalCommand
|
257
|
+
regexp commands/variables.rb /^ def regexp$/;" f class:VarInstanceCommand
|
258
|
+
regexp commands/variables.rb /^ def regexp$/;" f class:VarLocalCommand
|
259
|
+
splitter processor.rb /^ def splitter$/;" f class:Debugger.ControlCommandProcessor
|
260
|
+
timeout command.rb /^ def timeout(sec)$/;" f class:Debugger
|
@@ -136,6 +136,18 @@ module Debugger
|
|
136
136
|
print "<breakpointDeleted no=\"%s\"/>", b.id
|
137
137
|
end
|
138
138
|
|
139
|
+
def print_breakpoint_enabled(b)
|
140
|
+
print "<breakpointEnabled bp_id=\"%s\"/>", b.id
|
141
|
+
end
|
142
|
+
|
143
|
+
def print_breakpoint_disabled(b)
|
144
|
+
print "<breakpointDisabled bp_id=\"%s\"/>", b.id
|
145
|
+
end
|
146
|
+
|
147
|
+
def print_contdition_set(bp_id)
|
148
|
+
print "<conditionSet bp_id=\"%d\"/>", bp_id
|
149
|
+
end
|
150
|
+
|
139
151
|
def print_expressions(exps)
|
140
152
|
print_element "expressions" do
|
141
153
|
exps.each_with_index do |(exp, value), idx|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-debug-ide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Barchfeld, Martin Krauskopf
|
@@ -9,7 +9,7 @@ autorequire: ruby-debug-base
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-06-17 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - "="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.10.
|
22
|
+
version: 0.10.1
|
23
23
|
version:
|
24
24
|
description: An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
|
25
25
|
email: rubyeclipse-dev-list@sourceforge.net
|
@@ -30,21 +30,24 @@ extensions: []
|
|
30
30
|
extra_rdoc_files: []
|
31
31
|
|
32
32
|
files:
|
33
|
-
- README
|
34
33
|
- bin/rdebug-ide
|
35
34
|
- lib/ruby-debug
|
35
|
+
- lib/ruby-debug/tags
|
36
36
|
- lib/ruby-debug/xml_printer.rb
|
37
37
|
- lib/ruby-debug/command.rb
|
38
38
|
- lib/ruby-debug/processor.rb
|
39
39
|
- lib/ruby-debug/commands
|
40
40
|
- lib/ruby-debug/commands/load.rb
|
41
41
|
- lib/ruby-debug/commands/breakpoints.rb
|
42
|
+
- lib/ruby-debug/commands/tags
|
42
43
|
- lib/ruby-debug/commands/variables.rb
|
43
44
|
- lib/ruby-debug/commands/control.rb
|
45
|
+
- lib/ruby-debug/commands/enable.rb
|
44
46
|
- lib/ruby-debug/commands/threads.rb
|
45
47
|
- lib/ruby-debug/commands/stepping.rb
|
46
48
|
- lib/ruby-debug/commands/eval.rb
|
47
49
|
- lib/ruby-debug/commands/catchpoint.rb
|
50
|
+
- lib/ruby-debug/commands/condition.rb
|
48
51
|
- lib/ruby-debug/commands/frame.rb
|
49
52
|
- lib/ruby-debug/commands/inspect.rb
|
50
53
|
- lib/ruby-debug/interface.rb
|
@@ -74,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
77
|
requirements: []
|
75
78
|
|
76
79
|
rubyforge_project: debug-commons
|
77
|
-
rubygems_version: 1.
|
80
|
+
rubygems_version: 1.1.1
|
78
81
|
signing_key:
|
79
82
|
specification_version: 2
|
80
83
|
summary: IDE interface for ruby-debug.
|
data/README
DELETED
File without changes
|