ruby-debug 0.10.3 → 0.10.4
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 +15 -0
- data/ChangeLog +461 -104
- data/Rakefile +69 -13
- data/VERSION +3 -0
- data/bin/rdebug +2 -1
- data/cli/ruby-debug.rb +8 -5
- data/cli/ruby-debug/command.rb +43 -4
- data/cli/ruby-debug/commands/breakpoints.rb +3 -1
- data/cli/ruby-debug/commands/catchpoint.rb +5 -3
- data/cli/ruby-debug/commands/{continue.RB.save → continue.RB} +0 -0
- data/cli/ruby-debug/commands/eval.rb +4 -1
- data/cli/ruby-debug/commands/frame.rb +11 -10
- data/cli/ruby-debug/commands/help.rb +5 -0
- data/cli/ruby-debug/commands/info.rb +6 -3
- data/cli/ruby-debug/commands/irb.rb +115 -12
- data/cli/ruby-debug/commands/kill.rb +50 -0
- data/cli/ruby-debug/commands/list.rb +3 -3
- data/cli/ruby-debug/commands/quit.rb +12 -6
- data/cli/ruby-debug/commands/raise.RB +41 -0
- data/cli/ruby-debug/commands/show.rb +26 -28
- data/cli/ruby-debug/helper.rb +5 -0
- data/cli/ruby-debug/interface.rb +53 -25
- data/cli/ruby-debug/processor.RB +484 -0
- data/cli/ruby-debug/processor.rb +140 -56
- data/rdbg.rb +0 -0
- data/runner.sh +7 -0
- data/test/base/base.rb +0 -0
- data/test/base/binding.rb +0 -0
- data/test/base/catchpoint.rb +0 -0
- data/test/base/reload_bug.rb +8 -0
- data/test/brkpt-class-bug.rb +8 -0
- data/test/cli/commands/unit/regexp.rb +11 -0
- data/test/config.yaml +8 -0
- data/test/data/annotate.cmd +1 -1
- data/test/data/annotate.right +3 -3
- data/test/data/break_bad.cmd +1 -1
- data/test/data/break_bad.right +1 -1
- data/test/data/break_loop_bug.right +1 -1
- data/test/data/breakpoints.cmd +1 -1
- data/test/data/breakpoints.right +3 -3
- data/test/data/brkpt-class-bug.cmd +9 -0
- data/test/data/brkpt-class-bug.right +18 -0
- data/test/data/catch.right +2 -0
- data/test/data/condition.cmd +1 -0
- data/test/data/condition.right +5 -3
- data/test/data/ctrl.right +2 -2
- data/test/data/display.right +1 -1
- data/test/data/emacs_basic.right +2 -2
- data/test/data/except-bug1.cmd +7 -0
- data/test/data/except-bug1.right +13 -0
- data/test/data/file-with-space.cmd +7 -0
- data/test/data/file-with-space.right +9 -0
- data/test/data/finish.right +1 -1
- data/test/data/frame.cmd +7 -1
- data/test/data/frame.right +12 -1
- data/test/data/info-var.right +1 -1
- data/test/data/info.cmd +1 -0
- data/test/data/info.right +21 -2
- data/test/data/list.right +1 -1
- data/test/data/method.right +1 -1
- data/test/data/post-mortem.right +5 -4
- data/test/data/save.right +1 -1
- data/test/data/setshow.cmd +0 -10
- data/test/data/setshow.right +0 -17
- data/test/dollar-0.rb +0 -0
- data/test/except-bug1.rb +4 -0
- data/test/file with space.rb +1 -0
- data/test/gcd-dbg.rb +0 -0
- data/test/helper.rb +7 -1
- data/test/pm-base.rb +0 -0
- data/test/pm.rb +1 -1
- data/test/raise.rb +0 -0
- data/test/rdebug-save.1 +7 -0
- data/test/tdebug.rb +2 -2
- data/test/test-annotate.rb +0 -0
- data/test/test-break-bad.rb +0 -0
- data/test/test-breakpoints.rb +0 -0
- data/test/test-brkpt-class-bug.rb +26 -0
- data/test/test-catch.rb +1 -1
- data/test/test-condition.rb +1 -1
- data/test/test-ctrl.rb +1 -0
- data/test/test-display.rb +0 -0
- data/test/test-dollar-0.rb +0 -0
- data/test/test-edit.rb +0 -0
- data/test/test-emacs-basic.rb +0 -0
- data/test/test-enable.rb +0 -0
- data/test/test-except-bug1.rb +31 -0
- data/test/test-file-with-space.rb +30 -0
- data/test/test-finish.rb +0 -0
- data/test/test-frame.rb +0 -0
- data/test/test-help.rb +0 -0
- data/test/test-hist.rb +0 -0
- data/test/test-info-thread.rb +0 -0
- data/test/test-info-var.rb +0 -0
- data/test/test-info.rb +0 -0
- data/test/test-init.rb +7 -1
- data/test/test-list.rb +0 -0
- data/test/test-method.rb +0 -0
- data/test/test-output.rb +0 -0
- data/test/test-pm.rb +0 -0
- data/test/test-quit.rb +0 -0
- data/test/test-raise.rb +1 -1
- data/test/test-save.rb +7 -1
- data/test/test-setshow.rb +0 -0
- data/test/test-source.rb +0 -0
- data/test/test-stepping.rb +0 -0
- data/test/test-trace.rb +0 -0
- metadata +211 -180
data/test/config.yaml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# Do not commit personal changes here back to the repository. Create
|
2
|
+
# config.private.yaml which, if exists, is preferred to this one.
|
3
|
+
|
4
|
+
# either should be on the $PATH or use full path
|
5
|
+
ruby: ruby
|
6
|
+
|
7
|
+
# possibility to specify interpreter parameters
|
8
|
+
#ruby_params: -w
|
data/test/data/annotate.cmd
CHANGED
data/test/data/annotate.right
CHANGED
@@ -31,7 +31,7 @@ self = main
|
|
31
31
|
if a > b
|
32
32
|
# # "break" should trigger break annotation
|
33
33
|
# break 10
|
34
|
-
Breakpoint 1 file
|
34
|
+
Breakpoint 1 file gcd.rb, line 10
|
35
35
|
breakpoints
|
36
36
|
Num Enb What
|
37
37
|
1 y at gcd.rb:10
|
@@ -56,7 +56,7 @@ self = main
|
|
56
56
|
|
57
57
|
# # "b" should trigger like "break"
|
58
58
|
# b 12
|
59
|
-
Breakpoint 2 file
|
59
|
+
Breakpoint 2 file gcd.rb, line 12
|
60
60
|
breakpoints
|
61
61
|
Num Enb What
|
62
62
|
2 y at gcd.rb:12
|
@@ -136,4 +136,4 @@ Num Enb What
|
|
136
136
|
|
137
137
|
display
|
138
138
|
|
139
|
-
# quit
|
139
|
+
# quit!
|
data/test/data/break_bad.cmd
CHANGED
data/test/data/break_bad.right
CHANGED
data/test/data/breakpoints.cmd
CHANGED
data/test/data/breakpoints.right
CHANGED
@@ -12,9 +12,9 @@ Frame call-display style is last.
|
|
12
12
|
# set autoeval off
|
13
13
|
autoeval is off.
|
14
14
|
# break 6
|
15
|
-
Breakpoint 1 file
|
15
|
+
Breakpoint 1 file gcd.rb, line 6
|
16
16
|
# break 10
|
17
|
-
Breakpoint 2 file
|
17
|
+
Breakpoint 2 file gcd.rb, line 10
|
18
18
|
# break 11
|
19
19
|
*** Line 11 is not a stopping point in file "gcd.rb".
|
20
20
|
# continue
|
@@ -95,4 +95,4 @@ No breakpoints.
|
|
95
95
|
*** No breakpoints have been set.
|
96
96
|
# enable 1
|
97
97
|
*** No breakpoints have been set.
|
98
|
-
#
|
98
|
+
# q!
|
@@ -0,0 +1,18 @@
|
|
1
|
+
brkpt-class-bug.rb:1
|
2
|
+
class A
|
3
|
+
# # Rubyforge Patch #26987
|
4
|
+
# # http://www.ruby-forum.com/topic/193901
|
5
|
+
# set debuggertesting on
|
6
|
+
Currently testing the debugger is on.
|
7
|
+
# set autoeval off
|
8
|
+
autoeval is off.
|
9
|
+
# next
|
10
|
+
brkpt-class-bug.rb:6
|
11
|
+
x = 1
|
12
|
+
# break A.show
|
13
|
+
Breakpoint 1 at A::show
|
14
|
+
# c
|
15
|
+
Breakpoint 1 at A:show
|
16
|
+
brkpt-class-bug.rb:2
|
17
|
+
def A.show
|
18
|
+
# quit
|
data/test/data/catch.right
CHANGED
data/test/data/condition.cmd
CHANGED
data/test/data/condition.right
CHANGED
@@ -6,12 +6,14 @@ def gcd(a, b)
|
|
6
6
|
# # ********************************************************
|
7
7
|
# set debuggertesting on
|
8
8
|
Currently testing the debugger is on.
|
9
|
+
# set basename on
|
10
|
+
basename is on.
|
9
11
|
# set callstyle last
|
10
12
|
Frame call-display style is last.
|
11
13
|
# set autoeval off
|
12
14
|
autoeval is off.
|
13
15
|
# break 6 if a > b
|
14
|
-
Breakpoint 1 file
|
16
|
+
Breakpoint 1 file gcd.rb, line 6
|
15
17
|
# info break
|
16
18
|
Num Enb What
|
17
19
|
1 y at gcd.rb:6 if a > b
|
@@ -20,7 +22,7 @@ Num Enb What
|
|
20
22
|
Num Enb What
|
21
23
|
1 y at gcd.rb:6
|
22
24
|
# break 12
|
23
|
-
Breakpoint 2 file
|
25
|
+
Breakpoint 2 file gcd.rb, line 12
|
24
26
|
# condition 2 1 == a
|
25
27
|
# # FIXME: should be able to catch error on:
|
26
28
|
# # condition 2 if 1 == a
|
@@ -38,7 +40,7 @@ Num Enb What
|
|
38
40
|
1
|
39
41
|
# # Now test trying to enable an invalid breakpoint
|
40
42
|
# break 6 if a >
|
41
|
-
Breakpoint 3 file
|
43
|
+
Breakpoint 3 file gcd.rb, line 6
|
42
44
|
*** Expression "a > " syntactically incorrect; breakpoint disabled.
|
43
45
|
# info break
|
44
46
|
Num Enb What
|
data/test/data/ctrl.right
CHANGED
@@ -3,8 +3,8 @@ width is 80.
|
|
3
3
|
Type 'help <command-name>' for help on a specific command
|
4
4
|
|
5
5
|
Available commands:
|
6
|
-
break delete eval help interrupt
|
7
|
-
catch edit exit info
|
6
|
+
break delete eval help interrupt p ps quit restart set source
|
7
|
+
catch edit exit info kill pp putl reload save show thread
|
8
8
|
|
9
9
|
Generic command for showing things about the program being debugged.
|
10
10
|
--
|
data/test/data/display.right
CHANGED
data/test/data/emacs_basic.right
CHANGED
@@ -12,9 +12,9 @@ Frame call-display style is last.
|
|
12
12
|
# set autoeval off
|
13
13
|
autoeval is off.
|
14
14
|
# break 6
|
15
|
-
Breakpoint 1 file
|
15
|
+
Breakpoint 1 file gcd.rb, line 6
|
16
16
|
# break 10
|
17
|
-
Breakpoint 2 file
|
17
|
+
Breakpoint 2 file gcd.rb, line 10
|
18
18
|
# continue
|
19
19
|
Breakpoint 1 at gcd.rb:6
|
20
20
|
gcd.rb:6
|
@@ -0,0 +1,13 @@
|
|
1
|
+
except-bug1.rb:1
|
2
|
+
def foo(n)
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests a bug in showing variables in post-mortem.
|
5
|
+
# # ********************************************************
|
6
|
+
# set debuggertesting on
|
7
|
+
Currently testing the debugger is on.
|
8
|
+
# continue
|
9
|
+
except-bug1.rb:2
|
10
|
+
1/0
|
11
|
+
# p n
|
12
|
+
5
|
13
|
+
# quit
|
@@ -0,0 +1,9 @@
|
|
1
|
+
file with space.rb:1
|
2
|
+
puts 'Ha!'
|
3
|
+
# # *********************************************************
|
4
|
+
# # This is run on a file with an embedded space in the name
|
5
|
+
# # ********************************************************
|
6
|
+
# set debuggertesting on
|
7
|
+
Currently testing the debugger is on.
|
8
|
+
# step
|
9
|
+
Ha!
|
data/test/data/finish.right
CHANGED
data/test/data/frame.cmd
CHANGED
@@ -12,7 +12,7 @@ up
|
|
12
12
|
where
|
13
13
|
down
|
14
14
|
where
|
15
|
-
frame
|
15
|
+
frame
|
16
16
|
where
|
17
17
|
frame -1
|
18
18
|
where
|
@@ -23,4 +23,10 @@ where
|
|
23
23
|
frame 0 thread 3
|
24
24
|
frame 0 thread 1
|
25
25
|
# finish
|
26
|
+
# See that we don't match more than 'down' or 'up' when used as a variable.
|
27
|
+
set autoeval on
|
28
|
+
download = 1
|
29
|
+
download
|
30
|
+
upload = 'hey'
|
31
|
+
upload
|
26
32
|
quit
|
data/test/data/frame.right
CHANGED
@@ -27,7 +27,7 @@ if a > b
|
|
27
27
|
# where
|
28
28
|
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
29
29
|
#1 at line gcd.rb:18
|
30
|
-
# frame
|
30
|
+
# frame
|
31
31
|
#0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
32
32
|
# where
|
33
33
|
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
@@ -52,4 +52,15 @@ if a > b
|
|
52
52
|
# frame 0 thread 1
|
53
53
|
#0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
54
54
|
# # finish
|
55
|
+
# # See that we don't match more than 'down' or 'up' when used as a variable.
|
56
|
+
# set autoeval on
|
57
|
+
autoeval is on.
|
58
|
+
# download = 1
|
59
|
+
1
|
60
|
+
# download
|
61
|
+
1
|
62
|
+
# upload = 'hey'
|
63
|
+
"hey"
|
64
|
+
# upload
|
65
|
+
"hey"
|
55
66
|
# quit
|
data/test/data/info-var.right
CHANGED
@@ -21,7 +21,7 @@ return x
|
|
21
21
|
self = main
|
22
22
|
x = *Error in evaluation*
|
23
23
|
# break 31
|
24
|
-
Breakpoint 1 file
|
24
|
+
Breakpoint 1 file info-var-bug.rb, line 31
|
25
25
|
# # The first time through, we can do inspect.
|
26
26
|
# continue
|
27
27
|
Breakpoint 1 at info-var-bug.rb:31
|
data/test/data/info.cmd
CHANGED
data/test/data/info.right
CHANGED
@@ -42,9 +42,9 @@ integer argument, list info on that breakpoint.
|
|
42
42
|
# help info display
|
43
43
|
Expressions to display when program stops.
|
44
44
|
# break 10
|
45
|
-
Breakpoint 1 file
|
45
|
+
Breakpoint 1 file gcd.rb, line 10
|
46
46
|
# break 12
|
47
|
-
Breakpoint 2 file
|
47
|
+
Breakpoint 2 file gcd.rb, line 12
|
48
48
|
# info break 10
|
49
49
|
*** No breakpoints found among list given.
|
50
50
|
# info break 1
|
@@ -62,4 +62,23 @@ Num Enb What
|
|
62
62
|
File ./gcd.rb
|
63
63
|
breakpoint line numbers:
|
64
64
|
4 6 6 7 10 10 12 12 13 15 18
|
65
|
+
# i
|
66
|
+
*** "info" must be followed by the name of an info command:
|
67
|
+
List of info subcommands:
|
68
|
+
|
69
|
+
info args -- Argument variables of current stack frame
|
70
|
+
info breakpoints -- Status of user-settable breakpoints
|
71
|
+
info catch -- Exceptions that can be caught in the current stack frame
|
72
|
+
info display -- Expressions to display when program stops
|
73
|
+
info file -- Info about a particular file read in
|
74
|
+
info files -- File names and timestamps of files read in
|
75
|
+
info global_variables -- Global variables
|
76
|
+
info instance_variables -- Instance variables of the current stack frame
|
77
|
+
info line -- Line number and file name of current position in source file
|
78
|
+
info locals -- Local variables of the current stack frame
|
79
|
+
info program -- Execution status of the program
|
80
|
+
info stack -- Backtrace of the stack
|
81
|
+
info thread -- List info about thread NUM
|
82
|
+
info threads -- information of currently-known threads
|
83
|
+
info variables -- Local and instance variables of the current stack frame
|
65
84
|
# quit
|
data/test/data/list.right
CHANGED
data/test/data/method.right
CHANGED
data/test/data/post-mortem.right
CHANGED
@@ -23,9 +23,10 @@ Exception: #<ZeroDivisionError: divided by 0>
|
|
23
23
|
Type 'help <command-name>' for help on a specific command
|
24
24
|
|
25
25
|
Available commands:
|
26
|
-
backtrace
|
27
|
-
break
|
28
|
-
catch
|
29
|
-
condition
|
26
|
+
backtrace delete enable info p reload source var
|
27
|
+
break disable eval irb pp restart thread where
|
28
|
+
catch display exit kill ps save trace
|
29
|
+
condition down frame list putl set undisplay
|
30
|
+
continue edit help method quit show up
|
30
31
|
|
31
32
|
# quit
|
data/test/data/save.right
CHANGED
data/test/data/setshow.cmd
CHANGED
@@ -31,16 +31,6 @@ set linetrace on
|
|
31
31
|
show linetrace
|
32
32
|
set linetrace off
|
33
33
|
show linetrace
|
34
|
-
########################################
|
35
|
-
### show history
|
36
|
-
########################################
|
37
|
-
set history
|
38
|
-
set history size 10
|
39
|
-
show history size
|
40
|
-
set history save off
|
41
|
-
show history save
|
42
|
-
set history save 1
|
43
|
-
show history save
|
44
34
|
#### Test 'autoeval'...
|
45
35
|
set autoeval on
|
46
36
|
puts 'printed via autoeval'
|
data/test/data/setshow.right
CHANGED
@@ -53,23 +53,6 @@ line tracing is on.
|
|
53
53
|
line tracing is off.
|
54
54
|
# show linetrace
|
55
55
|
line tracing is off.
|
56
|
-
# ########################################
|
57
|
-
# ### show history
|
58
|
-
# ########################################
|
59
|
-
# set history
|
60
|
-
Need two parameters for 'set history'; got 0.
|
61
|
-
# set history size 10
|
62
|
-
Debugger history size is 10
|
63
|
-
# show history size
|
64
|
-
Debugger history size is 10
|
65
|
-
# set history save off
|
66
|
-
Saving of history save is off.
|
67
|
-
# show history save
|
68
|
-
Saving of history save is off.
|
69
|
-
# set history save 1
|
70
|
-
Saving of history save is on.
|
71
|
-
# show history save
|
72
|
-
Saving of history save is on.
|
73
56
|
# #### Test 'autoeval'...
|
74
57
|
# set autoeval on
|
75
58
|
autoeval is on.
|