ruby-debug 0.5.1-mswin32 → 0.5.2-mswin32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +5 -0
- data/bin/rdebug +9 -2
- data/ext/ruby_debug.c +1 -1
- data/lib/ruby-debug/command.rb +1 -1
- data/lib/ruby-debug/commands/control.rb +48 -4
- data/lib/ruby-debug/commands/frame.rb +1 -0
- data/lib/ruby-debug/commands/stepping.rb +3 -3
- data/lib/ruby-debug/commands/threads.rb +4 -4
- data/lib/ruby-debug/commands/trace.rb +2 -2
- data/lib/ruby-debug/processor.rb +1 -1
- data/lib/ruby_debug.so +0 -0
- metadata +2 -2
data/CHANGES
CHANGED
data/bin/rdebug
CHANGED
@@ -54,6 +54,12 @@ EOB
|
|
54
54
|
end
|
55
55
|
|
56
56
|
begin
|
57
|
+
Debugger::ARGV = ARGV.clone
|
58
|
+
rdebug_path = File.expand_path($0)
|
59
|
+
if RUBY_PLATFORM =~ /mswin/
|
60
|
+
rdebug_path += ".cmd" unless rdebug_path =~ /\.cmd$/i
|
61
|
+
end
|
62
|
+
Debugger::RDEBUG_SCRIPT = rdebug_path
|
57
63
|
opts.parse! ARGV
|
58
64
|
rescue StandardError => e
|
59
65
|
puts opts
|
@@ -72,13 +78,14 @@ else
|
|
72
78
|
exit(-1)
|
73
79
|
end
|
74
80
|
|
81
|
+
Debugger::PROG_SCRIPT = ARGV.shift
|
75
82
|
trap('INT') { Debugger.interrupt_last }
|
76
83
|
Debugger.stop_on_connect = !options.nostop
|
77
84
|
Debugger.wait_connection = options.wait
|
78
85
|
load "#{ENV["HOME"]}/.rdebugrc" if File.exists?("#{ENV["HOME"]}/.rdebugrc")
|
79
86
|
if options.server
|
80
87
|
Debugger.start_remote(options.host, [options.port, options.cport], options.post_mortem)
|
81
|
-
Debugger.debug_load
|
88
|
+
Debugger.debug_load Debugger::PROG_SCRIPT
|
82
89
|
else
|
83
90
|
Debugger.start
|
84
91
|
if options.script
|
@@ -86,6 +93,6 @@ else
|
|
86
93
|
end
|
87
94
|
Debugger.post_mortem if options.post_mortem
|
88
95
|
debugger 2
|
89
|
-
Debugger.debug_load
|
96
|
+
Debugger.debug_load Debugger::PROG_SCRIPT
|
90
97
|
end
|
91
98
|
end
|
data/ext/ruby_debug.c
CHANGED
data/lib/ruby-debug/command.rb
CHANGED
@@ -3,7 +3,7 @@ module Debugger
|
|
3
3
|
self.control = true
|
4
4
|
|
5
5
|
def regexp
|
6
|
-
/^\s*q(?:uit)
|
6
|
+
/^\s*(?:q(?:uit)?|exit)\s*$/
|
7
7
|
end
|
8
8
|
|
9
9
|
def execute
|
@@ -15,21 +15,65 @@ module Debugger
|
|
15
15
|
|
16
16
|
class << self
|
17
17
|
def help_command
|
18
|
-
|
18
|
+
%w[quit exit]
|
19
19
|
end
|
20
20
|
|
21
21
|
def help(cmd)
|
22
22
|
%{
|
23
|
-
q[uit]\texit from debugger
|
23
|
+
q[uit]\texit from debugger,
|
24
|
+
exit\talias to quit
|
24
25
|
}
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
30
|
+
class RestartCommand < Command # :nodoc:
|
31
|
+
self.control = true
|
32
|
+
|
33
|
+
def regexp
|
34
|
+
/ ^\s*
|
35
|
+
(restart|R)
|
36
|
+
(\s+ \S+ .*)?
|
37
|
+
$
|
38
|
+
/x
|
39
|
+
end
|
40
|
+
|
41
|
+
def execute
|
42
|
+
if not defined? Debugger::RDEBUG_SCRIPT or not defined? Debugger::ARGV
|
43
|
+
print "We are not in a context we can restart from.\n"
|
44
|
+
return
|
45
|
+
end
|
46
|
+
if @match[2]
|
47
|
+
args = Debugger::PROG_SCRIPT + " " + @match[2]
|
48
|
+
else
|
49
|
+
args = Debugger::ARGV.join(" ")
|
50
|
+
end
|
51
|
+
|
52
|
+
# An execv would be preferable to the "exec" below.
|
53
|
+
cmd = Debugger::RDEBUG_SCRIPT + " " + args
|
54
|
+
print "Re exec'ing:\n\t#{cmd}\n"
|
55
|
+
exec cmd
|
56
|
+
end
|
57
|
+
|
58
|
+
class << self
|
59
|
+
def help_command
|
60
|
+
'restart'
|
61
|
+
end
|
62
|
+
|
63
|
+
def help(cmd)
|
64
|
+
%{
|
65
|
+
restart|R [args]
|
66
|
+
Restart the program. This is is a re-exec - all debugger state
|
67
|
+
is lost. If command arguments are passed those are used.
|
68
|
+
}
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
29
73
|
class InterruptCommand < Command # :nodoc:
|
30
74
|
self.event = false
|
31
75
|
self.control = true
|
32
|
-
self.
|
76
|
+
self.need_context = true
|
33
77
|
|
34
78
|
def regexp
|
35
79
|
/^\s*i(?:nterrupt)?\s*$/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Debugger
|
2
2
|
class NextCommand < Command # :nodoc:
|
3
|
-
self.
|
3
|
+
self.need_context = true
|
4
4
|
|
5
5
|
def regexp
|
6
6
|
/^\s*n(?:ext)?(?:\s+(\d+))?$/
|
@@ -26,7 +26,7 @@ module Debugger
|
|
26
26
|
end
|
27
27
|
|
28
28
|
class StepCommand < Command # :nodoc:
|
29
|
-
self.
|
29
|
+
self.need_context = true
|
30
30
|
|
31
31
|
def regexp
|
32
32
|
/^\s*s(?:tep)?(?:\s+(\d+))?$/
|
@@ -51,7 +51,7 @@ module Debugger
|
|
51
51
|
end
|
52
52
|
|
53
53
|
class FinishCommand < Command # :nodoc:
|
54
|
-
self.
|
54
|
+
self.need_context = true
|
55
55
|
|
56
56
|
def regexp
|
57
57
|
/^\s*fin(?:ish)?$/
|
@@ -47,7 +47,7 @@ module Debugger
|
|
47
47
|
|
48
48
|
class ThreadSwitchCommand < Command # :nodoc:
|
49
49
|
self.control = true
|
50
|
-
self.
|
50
|
+
self.need_context = true
|
51
51
|
|
52
52
|
include ThreadFunctions
|
53
53
|
|
@@ -85,7 +85,7 @@ module Debugger
|
|
85
85
|
|
86
86
|
class ThreadStopCommand < Command # :nodoc:
|
87
87
|
self.control = true
|
88
|
-
self.
|
88
|
+
self.need_context = true
|
89
89
|
|
90
90
|
include ThreadFunctions
|
91
91
|
|
@@ -122,7 +122,7 @@ module Debugger
|
|
122
122
|
end
|
123
123
|
|
124
124
|
class ThreadCurrentCommand < Command # :nodoc:
|
125
|
-
self.
|
125
|
+
self.need_context = true
|
126
126
|
|
127
127
|
include ThreadFunctions
|
128
128
|
|
@@ -149,7 +149,7 @@ module Debugger
|
|
149
149
|
|
150
150
|
class ThreadResumeCommand < Command # :nodoc:
|
151
151
|
self.control = true
|
152
|
-
self.
|
152
|
+
self.need_context = true
|
153
153
|
|
154
154
|
include ThreadFunctions
|
155
155
|
|
@@ -8,9 +8,9 @@ module Debugger
|
|
8
8
|
if @match[2]
|
9
9
|
Debugger.tracing = @match[1] == 'on'
|
10
10
|
elsif @match[1]
|
11
|
-
|
11
|
+
Debugger.current_context.tracing = @match[1] == 'on'
|
12
12
|
end
|
13
|
-
if Debugger.tracing ||
|
13
|
+
if Debugger.tracing || Debugger.current_context.tracing
|
14
14
|
print "Trace on.\n"
|
15
15
|
else
|
16
16
|
print "Trace off.\n"
|
data/lib/ruby-debug/processor.rb
CHANGED
data/lib/ruby_debug.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: ruby-debug
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2006-12-
|
6
|
+
version: 0.5.2
|
7
|
+
date: 2006-12-21 16:17:18 -05:00
|
8
8
|
summary: Fast Ruby debugger
|
9
9
|
require_paths:
|
10
10
|
- lib
|