debugger 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +10 -0
- data/CHANGES +334 -0
- data/ChangeLog +5655 -0
- data/INSTALL.SVN +154 -0
- data/LICENSE +23 -0
- data/Makefile.am +14 -0
- data/OLD_README +122 -0
- data/README.md +10 -0
- data/Rakefile +266 -0
- data/autogen.sh +4 -0
- data/bin/rdebug +398 -0
- data/cli/ruby-debug.rb +173 -0
- data/cli/ruby-debug/command.rb +228 -0
- data/cli/ruby-debug/commands/breakpoints.rb +153 -0
- data/cli/ruby-debug/commands/catchpoint.rb +55 -0
- data/cli/ruby-debug/commands/condition.rb +49 -0
- data/cli/ruby-debug/commands/continue.rb +38 -0
- data/cli/ruby-debug/commands/control.rb +107 -0
- data/cli/ruby-debug/commands/display.rb +120 -0
- data/cli/ruby-debug/commands/edit.rb +48 -0
- data/cli/ruby-debug/commands/enable.rb +202 -0
- data/cli/ruby-debug/commands/eval.rb +176 -0
- data/cli/ruby-debug/commands/finish.rb +42 -0
- data/cli/ruby-debug/commands/frame.rb +301 -0
- data/cli/ruby-debug/commands/help.rb +56 -0
- data/cli/ruby-debug/commands/info.rb +467 -0
- data/cli/ruby-debug/commands/irb.rb +123 -0
- data/cli/ruby-debug/commands/jump.rb +66 -0
- data/cli/ruby-debug/commands/kill.rb +51 -0
- data/cli/ruby-debug/commands/list.rb +94 -0
- data/cli/ruby-debug/commands/method.rb +84 -0
- data/cli/ruby-debug/commands/quit.rb +39 -0
- data/cli/ruby-debug/commands/reload.rb +40 -0
- data/cli/ruby-debug/commands/save.rb +90 -0
- data/cli/ruby-debug/commands/set.rb +221 -0
- data/cli/ruby-debug/commands/show.rb +247 -0
- data/cli/ruby-debug/commands/skip.rb +35 -0
- data/cli/ruby-debug/commands/source.rb +36 -0
- data/cli/ruby-debug/commands/stepping.rb +81 -0
- data/cli/ruby-debug/commands/threads.rb +189 -0
- data/cli/ruby-debug/commands/tmate.rb +36 -0
- data/cli/ruby-debug/commands/trace.rb +57 -0
- data/cli/ruby-debug/commands/variables.rb +199 -0
- data/cli/ruby-debug/debugger.rb +5 -0
- data/cli/ruby-debug/helper.rb +69 -0
- data/cli/ruby-debug/interface.rb +232 -0
- data/cli/ruby-debug/processor.rb +474 -0
- data/configure.ac +12 -0
- data/debugger.gemspec +24 -0
- data/doc/.cvsignore +42 -0
- data/doc/Makefile.am +63 -0
- data/doc/emacs-notes.txt +38 -0
- data/doc/hanoi.rb +35 -0
- data/doc/primes.rb +28 -0
- data/doc/rdebug-emacs.texi +1030 -0
- data/doc/rdebug.1 +241 -0
- data/doc/ruby-debug.texi +3791 -0
- data/doc/test-tri2.rb +18 -0
- data/doc/tri3.rb +8 -0
- data/doc/triangle.rb +12 -0
- data/emacs/Makefile.am +130 -0
- data/emacs/rdebug-annotate.el +385 -0
- data/emacs/rdebug-breaks.el +407 -0
- data/emacs/rdebug-cmd.el +92 -0
- data/emacs/rdebug-core.el +502 -0
- data/emacs/rdebug-dbg.el +62 -0
- data/emacs/rdebug-error.el +79 -0
- data/emacs/rdebug-fns.el +111 -0
- data/emacs/rdebug-frames.el +230 -0
- data/emacs/rdebug-gud.el +242 -0
- data/emacs/rdebug-help.el +104 -0
- data/emacs/rdebug-info.el +83 -0
- data/emacs/rdebug-layouts.el +180 -0
- data/emacs/rdebug-locring.el +118 -0
- data/emacs/rdebug-output.el +106 -0
- data/emacs/rdebug-regexp.el +118 -0
- data/emacs/rdebug-secondary.el +260 -0
- data/emacs/rdebug-shortkey.el +175 -0
- data/emacs/rdebug-source.el +568 -0
- data/emacs/rdebug-track.el +392 -0
- data/emacs/rdebug-varbuf.el +150 -0
- data/emacs/rdebug-vars.el +125 -0
- data/emacs/rdebug-watch.el +132 -0
- data/emacs/rdebug.el +326 -0
- data/emacs/test/elk-test.el +242 -0
- data/emacs/test/test-annotate.el +103 -0
- data/emacs/test/test-cmd.el +116 -0
- data/emacs/test/test-core.el +104 -0
- data/emacs/test/test-fns.el +65 -0
- data/emacs/test/test-frames.el +62 -0
- data/emacs/test/test-gud.el +35 -0
- data/emacs/test/test-indent.el +58 -0
- data/emacs/test/test-regexp.el +144 -0
- data/emacs/test/test-shortkey.el +61 -0
- data/ext/ruby_debug/breakpoint.c +586 -0
- data/ext/ruby_debug/extconf.rb +49 -0
- data/ext/ruby_debug/ruby_debug.c +2624 -0
- data/ext/ruby_debug/ruby_debug.h +148 -0
- data/lib/ChangeLog +1065 -0
- data/lib/debugger.rb +7 -0
- data/lib/debugger/version.rb +3 -0
- data/lib/ruby-debug-base.rb +304 -0
- data/rdbg.rb +33 -0
- data/runner.sh +7 -0
- data/svn2cl_usermap +3 -0
- data/test/.cvsignore +1 -0
- data/test/base/base.rb +74 -0
- data/test/base/binding.rb +31 -0
- data/test/base/catchpoint.rb +26 -0
- data/test/base/load.rb +40 -0
- data/test/bp_loop_issue.rb +3 -0
- data/test/classes.rb +11 -0
- data/test/cli/commands/catchpoint_test.rb +36 -0
- data/test/cli/commands/unit/regexp.rb +42 -0
- data/test/config.yaml +8 -0
- data/test/data/annotate.cmd +29 -0
- data/test/data/annotate.right +139 -0
- data/test/data/break_bad.cmd +18 -0
- data/test/data/break_bad.right +28 -0
- data/test/data/break_loop_bug.cmd +5 -0
- data/test/data/break_loop_bug.right +15 -0
- data/test/data/breakpoints.cmd +38 -0
- data/test/data/breakpoints.right +98 -0
- data/test/data/catch.cmd +20 -0
- data/test/data/catch.right +49 -0
- data/test/data/catch2.cmd +19 -0
- data/test/data/catch2.right +65 -0
- data/test/data/catch3.cmd +11 -0
- data/test/data/catch3.right +37 -0
- data/test/data/condition.cmd +28 -0
- data/test/data/condition.right +65 -0
- data/test/data/ctrl.cmd +23 -0
- data/test/data/ctrl.right +70 -0
- data/test/data/display.cmd +24 -0
- data/test/data/display.right +44 -0
- data/test/data/dollar-0.right +2 -0
- data/test/data/dollar-0a.right +2 -0
- data/test/data/dollar-0b.right +2 -0
- data/test/data/edit.cmd +12 -0
- data/test/data/edit.right +19 -0
- data/test/data/emacs_basic.cmd +43 -0
- data/test/data/emacs_basic.right +106 -0
- data/test/data/enable.cmd +20 -0
- data/test/data/enable.right +36 -0
- data/test/data/finish.cmd +16 -0
- data/test/data/finish.right +31 -0
- data/test/data/frame.cmd +26 -0
- data/test/data/frame.right +55 -0
- data/test/data/help.cmd +20 -0
- data/test/data/help.right +21 -0
- data/test/data/history.right +7 -0
- data/test/data/info-thread.cmd +13 -0
- data/test/data/info-thread.right +37 -0
- data/test/data/info-var-bug2.cmd +5 -0
- data/test/data/info-var-bug2.right +10 -0
- data/test/data/info-var.cmd +23 -0
- data/test/data/info-var.right +52 -0
- data/test/data/info.cmd +21 -0
- data/test/data/info.right +65 -0
- data/test/data/jump.cmd +16 -0
- data/test/data/jump.right +56 -0
- data/test/data/jump2.cmd +16 -0
- data/test/data/jump2.right +44 -0
- data/test/data/linetrace.cmd +6 -0
- data/test/data/linetrace.right +23 -0
- data/test/data/list.cmd +19 -0
- data/test/data/list.right +127 -0
- data/test/data/method.cmd +10 -0
- data/test/data/method.right +21 -0
- data/test/data/methodsig.cmd +10 -0
- data/test/data/methodsig.right +20 -0
- data/test/data/next.cmd +22 -0
- data/test/data/next.right +61 -0
- data/test/data/noquit.right +1 -0
- data/test/data/output.cmd +6 -0
- data/test/data/output.right +31 -0
- data/test/data/pm-bug.cmd +7 -0
- data/test/data/pm-bug.right +12 -0
- data/test/data/post-mortem-next.cmd +8 -0
- data/test/data/post-mortem-next.right +14 -0
- data/test/data/post-mortem-osx.right +31 -0
- data/test/data/post-mortem.cmd +13 -0
- data/test/data/post-mortem.right +32 -0
- data/test/data/quit.cmd +6 -0
- data/test/data/quit.right +0 -0
- data/test/data/raise.cmd +11 -0
- data/test/data/raise.right +23 -0
- data/test/data/save.cmd +34 -0
- data/test/data/save.right +59 -0
- data/test/data/scope-var.cmd +42 -0
- data/test/data/scope-var.right +587 -0
- data/test/data/setshow.cmd +56 -0
- data/test/data/setshow.right +98 -0
- data/test/data/source.cmd +5 -0
- data/test/data/source.right +15 -0
- data/test/data/stepping.cmd +21 -0
- data/test/data/stepping.right +50 -0
- data/test/data/test-init-cygwin.right +7 -0
- data/test/data/test-init-osx.right +4 -0
- data/test/data/test-init.right +5 -0
- data/test/data/trace.right +14 -0
- data/test/dollar-0.rb +5 -0
- data/test/gcd-dbg-nox.rb +31 -0
- data/test/gcd-dbg.rb +30 -0
- data/test/gcd.rb +18 -0
- data/test/helper.rb +144 -0
- data/test/info-var-bug.rb +47 -0
- data/test/info-var-bug2.rb +2 -0
- data/test/jump.rb +14 -0
- data/test/jump2.rb +27 -0
- data/test/next.rb +18 -0
- data/test/null.rb +1 -0
- data/test/output.rb +2 -0
- data/test/pm-base.rb +22 -0
- data/test/pm-bug.rb +3 -0
- data/test/pm-catch.rb +12 -0
- data/test/pm-catch2.rb +27 -0
- data/test/pm-catch3.rb +47 -0
- data/test/pm.rb +11 -0
- data/test/raise.rb +3 -0
- data/test/rdebug-save.1 +7 -0
- data/test/runall +12 -0
- data/test/scope-var.rb +29 -0
- data/test/tdebug.rb +248 -0
- data/test/test-annotate.rb +25 -0
- data/test/test-break-bad.rb +37 -0
- data/test/test-breakpoints.rb +25 -0
- data/test/test-catch.rb +25 -0
- data/test/test-catch2.rb +25 -0
- data/test/test-catch3.rb +25 -0
- data/test/test-condition.rb +25 -0
- data/test/test-ctrl.rb +55 -0
- data/test/test-display.rb +26 -0
- data/test/test-dollar-0.rb +40 -0
- data/test/test-edit.rb +26 -0
- data/test/test-emacs-basic.rb +26 -0
- data/test/test-enable.rb +25 -0
- data/test/test-finish.rb +34 -0
- data/test/test-frame.rb +34 -0
- data/test/test-help.rb +60 -0
- data/test/test-hist.rb +68 -0
- data/test/test-info-thread.rb +32 -0
- data/test/test-info-var.rb +47 -0
- data/test/test-info.rb +26 -0
- data/test/test-init.rb +44 -0
- data/test/test-jump.rb +35 -0
- data/test/test-list.rb +25 -0
- data/test/test-method.rb +34 -0
- data/test/test-next.rb +25 -0
- data/test/test-output.rb +26 -0
- data/test/test-quit.rb +30 -0
- data/test/test-raise.rb +25 -0
- data/test/test-save.rb +31 -0
- data/test/test-scope-var.rb +25 -0
- data/test/test-setshow.rb +25 -0
- data/test/test-source.rb +25 -0
- data/test/test-stepping.rb +26 -0
- data/test/test-trace.rb +47 -0
- data/test/thread1.rb +26 -0
- data/test/trunc-call.rb +31 -0
- metadata +364 -0
data/test/data/help.cmd
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# $Id: setshow.cmd 298 2007-08-28 10:07:35Z rockyb $
|
2
|
+
# This tests the functioning of some set/show debugger commands
|
3
|
+
set debuggertesting on
|
4
|
+
set autoeval off
|
5
|
+
set width 80
|
6
|
+
### *******************************
|
7
|
+
### *** help commands ***
|
8
|
+
### *******************************
|
9
|
+
help foo
|
10
|
+
help set listsize
|
11
|
+
help show anno
|
12
|
+
help show foo
|
13
|
+
help info file
|
14
|
+
help info file all
|
15
|
+
help info file br
|
16
|
+
help info files
|
17
|
+
|
18
|
+
# FIXME - the below should work
|
19
|
+
# help
|
20
|
+
# help step
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Currently testing the debugger is on.
|
2
|
+
autoeval is off.
|
3
|
+
width is 80.
|
4
|
+
Undefined command: "foo". Try "help".
|
5
|
+
Set number of source lines to list by default.
|
6
|
+
Show annotation level.
|
7
|
+
0 == normal; 2 == output annotated suitably for use by programs that control
|
8
|
+
ruby-debug.
|
9
|
+
Invalid 'show' subcommand 'foo'.
|
10
|
+
Info about a particular file read in.
|
11
|
+
|
12
|
+
After the file name is supplied, you can list file attributes that
|
13
|
+
you wish to see.
|
14
|
+
|
15
|
+
Attributes include: "all", "basic", "breakpoint", "lines", "mtime", "path"
|
16
|
+
and "sha1".
|
17
|
+
Info about a particular file read in.
|
18
|
+
All file information available - breakpoints, lines, mtime, path, and sha1.
|
19
|
+
Info about a particular file read in.
|
20
|
+
Show trace line numbers.
|
21
|
+
File names and timestamps of files read in.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests basic info thread commands
|
3
|
+
set debuggertesting on
|
4
|
+
set callstyle last
|
5
|
+
set autoeval off
|
6
|
+
info threads terse
|
7
|
+
info threads ver
|
8
|
+
info thread 1 t
|
9
|
+
info threads
|
10
|
+
info thread
|
11
|
+
help info thread
|
12
|
+
help info threads
|
13
|
+
q
|
@@ -0,0 +1,37 @@
|
|
1
|
+
gcd.rb:4
|
2
|
+
def gcd(a, b)
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests basic info thread commands
|
5
|
+
# set debuggertesting on
|
6
|
+
Currently testing the debugger is on.
|
7
|
+
# set callstyle last
|
8
|
+
Frame call-display style is last.
|
9
|
+
# set autoeval off
|
10
|
+
autoeval is off.
|
11
|
+
# info threads terse
|
12
|
+
+ 1 #<Thread:0xb7ceb708 run> ./gcd.rb:4
|
13
|
+
# info threads ver
|
14
|
+
+ 1 #<Thread:0xb7ceb708 run>
|
15
|
+
#0 at line gcd.rb:4
|
16
|
+
# info thread 1 t
|
17
|
+
+ 1 #<Thread:0xb7ceb708 run> ./gcd.rb:4
|
18
|
+
# info threads
|
19
|
+
+ 1 #<Thread:0xb7ceb708 run> ./gcd.rb:4
|
20
|
+
# info thread
|
21
|
+
+ 1 #<Thread:0xb7ceb708 run> ./gcd.rb:4
|
22
|
+
# help info thread
|
23
|
+
List info about thread NUM.
|
24
|
+
|
25
|
+
If no thread number is given, we list info for all threads. 'terse' and 'verbose'
|
26
|
+
options are possible. If terse, just give summary thread name information. See
|
27
|
+
"help info threads" for more detail about this summary information.
|
28
|
+
|
29
|
+
If 'verbose' appended to the end of the command, then the entire
|
30
|
+
stack trace is given for each thread.
|
31
|
+
# help info threads
|
32
|
+
information of currently-known threads.
|
33
|
+
|
34
|
+
This information includes whether the thread is current (+), if it is
|
35
|
+
suspended ($), or ignored (!). The thread number and the top stack
|
36
|
+
item. If 'verbose' is given then the entire stack frame is shown.
|
37
|
+
# q
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# ***************************************************
|
2
|
+
# Test handling of info variables when we have
|
3
|
+
# redefined inspect or to_s which give an error.
|
4
|
+
# ***************************************************
|
5
|
+
set debuggertesting on
|
6
|
+
# Go to where we have a bad "inspect" of a local variable
|
7
|
+
continue 36
|
8
|
+
info variables
|
9
|
+
# Go to where we have a bad "inspect" and "to_s" of a local variable
|
10
|
+
continue 40
|
11
|
+
info variables
|
12
|
+
break 31
|
13
|
+
# The first time through, we can do inspect.
|
14
|
+
continue
|
15
|
+
info locals
|
16
|
+
# Now go to where we have a bad "inspect" of an class variable
|
17
|
+
continue
|
18
|
+
info locals
|
19
|
+
info variables
|
20
|
+
# Now go to where we have a bad "inspect" and "to_s" of an class variable
|
21
|
+
continue
|
22
|
+
info locals
|
23
|
+
quit
|
@@ -0,0 +1,52 @@
|
|
1
|
+
info-var-bug.rb:1
|
2
|
+
class Lousy_inspect
|
3
|
+
# # ***************************************************
|
4
|
+
# # Test handling of info variables when we have
|
5
|
+
# # redefined inspect or to_s which give an error.
|
6
|
+
# # ***************************************************
|
7
|
+
# set debuggertesting on
|
8
|
+
Currently testing the debugger is on.
|
9
|
+
# # Go to where we have a bad "inspect" of a local variable
|
10
|
+
# continue 36
|
11
|
+
info-var-bug.rb:36
|
12
|
+
x
|
13
|
+
# info variables
|
14
|
+
self = main
|
15
|
+
x = #<Lousy_inspect:0xb7825034>
|
16
|
+
# # Go to where we have a bad "inspect" and "to_s" of a local variable
|
17
|
+
# continue 40
|
18
|
+
info-var-bug.rb:40
|
19
|
+
x
|
20
|
+
# info variables
|
21
|
+
self = main
|
22
|
+
x = *Error in evaluation*
|
23
|
+
# break 31
|
24
|
+
Breakpoint 1 file ./info-var-bug.rb, line 31
|
25
|
+
# # The first time through, we can do inspect.
|
26
|
+
# continue
|
27
|
+
Breakpoint 1 at info-var-bug.rb:31
|
28
|
+
info-var-bug.rb:31
|
29
|
+
@b = 5
|
30
|
+
# info locals
|
31
|
+
a = 10
|
32
|
+
# # Now go to where we have a bad "inspect" of an class variable
|
33
|
+
# continue
|
34
|
+
Breakpoint 1 at info-var-bug.rb:31
|
35
|
+
info-var-bug.rb:31
|
36
|
+
@b = 5
|
37
|
+
# info locals
|
38
|
+
a = #<Lousy_inspect:0xb784945c>
|
39
|
+
# info variables
|
40
|
+
a = #<Lousy_inspect:0xb780ddd0>
|
41
|
+
self = #<UnsuspectingClass:0xb78075e8>
|
42
|
+
@a = #<Lousy_inspect:0xb780ddd0>
|
43
|
+
@@Const = "A constant"
|
44
|
+
@@var = "a class variable"
|
45
|
+
# # Now go to where we have a bad "inspect" and "to_s" of an class variable
|
46
|
+
# continue
|
47
|
+
Breakpoint 1 at info-var-bug.rb:31
|
48
|
+
info-var-bug.rb:31
|
49
|
+
@b = 5
|
50
|
+
# info locals
|
51
|
+
*Error in evaluation*
|
52
|
+
# quit
|
data/test/data/info.cmd
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# ***************************************************
|
2
|
+
# This tests info command handling
|
3
|
+
# ***************************************************
|
4
|
+
set debuggertesting on
|
5
|
+
set callstyle last
|
6
|
+
help info
|
7
|
+
info args
|
8
|
+
info line
|
9
|
+
info locals
|
10
|
+
info stack
|
11
|
+
info display
|
12
|
+
help info break
|
13
|
+
help info display
|
14
|
+
break 10
|
15
|
+
break 12
|
16
|
+
info break 10
|
17
|
+
info break 1
|
18
|
+
info break 1 2
|
19
|
+
info break
|
20
|
+
info file ./gcd.rb break
|
21
|
+
quit
|
@@ -0,0 +1,65 @@
|
|
1
|
+
gcd.rb:4
|
2
|
+
def gcd(a, b)
|
3
|
+
# # ***************************************************
|
4
|
+
# # This tests info command handling
|
5
|
+
# # ***************************************************
|
6
|
+
# set debuggertesting on
|
7
|
+
Currently testing the debugger is on.
|
8
|
+
# set callstyle last
|
9
|
+
Frame call-display style is last.
|
10
|
+
# help info
|
11
|
+
Generic command for showing things about the program being debugged.
|
12
|
+
--
|
13
|
+
List of info subcommands:
|
14
|
+
--
|
15
|
+
info args -- Argument variables of current stack frame
|
16
|
+
info breakpoints -- Status of user-settable breakpoints
|
17
|
+
info catch -- Exceptions that can be caught in the current stack frame
|
18
|
+
info display -- Expressions to display when program stops
|
19
|
+
info file -- Info about a particular file read in
|
20
|
+
info files -- File names and timestamps of files read in
|
21
|
+
info global_variables -- Global variables
|
22
|
+
info instance_variables -- Instance variables of the current stack frame
|
23
|
+
info line -- Line number and file name of current position in source file
|
24
|
+
info locals -- Local variables of the current stack frame
|
25
|
+
info program -- Execution status of the program
|
26
|
+
info stack -- Backtrace of the stack
|
27
|
+
info thread -- List info about thread NUM
|
28
|
+
info threads -- information of currently-known threads
|
29
|
+
info variables -- Local and instance variables of the current stack frame
|
30
|
+
# info args
|
31
|
+
# info line
|
32
|
+
Line 4 of "./gcd.rb"
|
33
|
+
# info locals
|
34
|
+
# info stack
|
35
|
+
--> #0 at line gcd.rb:4
|
36
|
+
# info display
|
37
|
+
There are no auto-display expressions now.
|
38
|
+
# help info break
|
39
|
+
Status of user-settable breakpoints.
|
40
|
+
Without argument, list info about all breakpoints. With an
|
41
|
+
integer argument, list info on that breakpoint.
|
42
|
+
# help info display
|
43
|
+
Expressions to display when program stops.
|
44
|
+
# break 10
|
45
|
+
Breakpoint 1 file ./gcd.rb, line 10
|
46
|
+
# break 12
|
47
|
+
Breakpoint 2 file ./gcd.rb, line 12
|
48
|
+
# info break 10
|
49
|
+
*** No breakpoints found among list given.
|
50
|
+
# info break 1
|
51
|
+
Num Enb What
|
52
|
+
1 y at ./gcd.rb:10
|
53
|
+
# info break 1 2
|
54
|
+
Num Enb What
|
55
|
+
1 y at ./gcd.rb:10
|
56
|
+
2 y at ./gcd.rb:12
|
57
|
+
# info break
|
58
|
+
Num Enb What
|
59
|
+
1 y at ./gcd.rb:10
|
60
|
+
2 y at ./gcd.rb:12
|
61
|
+
# info file ./gcd.rb break
|
62
|
+
File ./gcd.rb
|
63
|
+
breakpoint line numbers:
|
64
|
+
4 6 7 10 12 13 15 18
|
65
|
+
# quit
|
data/test/data/jump.cmd
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests jump command
|
3
|
+
# ********************************************************
|
4
|
+
set debuggertesting on
|
5
|
+
set callstyle last
|
6
|
+
set force off
|
7
|
+
break 7
|
8
|
+
cont
|
9
|
+
jump -1
|
10
|
+
cont
|
11
|
+
delete 1
|
12
|
+
jump -1
|
13
|
+
jump +1
|
14
|
+
next
|
15
|
+
jump 2
|
16
|
+
cont
|
@@ -0,0 +1,56 @@
|
|
1
|
+
jump.rb:1
|
2
|
+
def foo
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests jump command
|
5
|
+
# # ********************************************************
|
6
|
+
# set debuggertesting on
|
7
|
+
Currently testing the debugger is on.
|
8
|
+
# set callstyle last
|
9
|
+
Frame call-display style is last.
|
10
|
+
# set force off
|
11
|
+
force-stepping is off.
|
12
|
+
# break 7
|
13
|
+
Breakpoint 1 file ./jump.rb, line 7
|
14
|
+
# cont
|
15
|
+
Breakpoint 1 at jump.rb:7
|
16
|
+
jump.rb:7
|
17
|
+
puts j
|
18
|
+
# jump -1
|
19
|
+
jump.rb:6
|
20
|
+
j = j + k
|
21
|
+
# cont
|
22
|
+
Breakpoint 1 at jump.rb:7
|
23
|
+
jump.rb:7
|
24
|
+
puts j
|
25
|
+
# delete 1
|
26
|
+
# jump -1
|
27
|
+
jump.rb:6
|
28
|
+
j = j + k
|
29
|
+
# jump +1
|
30
|
+
jump.rb:7
|
31
|
+
puts j
|
32
|
+
# next
|
33
|
+
21
|
34
|
+
jump.rb:6
|
35
|
+
j = j + k
|
36
|
+
# jump 2
|
37
|
+
jump.rb:2
|
38
|
+
j = 0
|
39
|
+
# cont
|
40
|
+
11
|
41
|
+
22
|
42
|
+
34
|
43
|
+
12
|
44
|
+
23
|
45
|
+
35
|
46
|
+
13
|
47
|
+
24
|
48
|
+
36
|
49
|
+
14
|
50
|
+
25
|
51
|
+
37
|
52
|
+
15
|
53
|
+
26
|
54
|
+
38
|
55
|
+
38
|
56
|
+
done
|
data/test/data/jump2.cmd
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests jump command
|
3
|
+
# ********************************************************
|
4
|
+
set debuggertesting on
|
5
|
+
set callstyle last
|
6
|
+
set force off
|
7
|
+
step
|
8
|
+
step
|
9
|
+
step
|
10
|
+
step
|
11
|
+
step
|
12
|
+
step
|
13
|
+
step
|
14
|
+
step
|
15
|
+
jump 20
|
16
|
+
cont
|
@@ -0,0 +1,44 @@
|
|
1
|
+
jump2.rb:1
|
2
|
+
def foo3(arg)
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests jump command
|
5
|
+
# # ********************************************************
|
6
|
+
# set debuggertesting on
|
7
|
+
Currently testing the debugger is on.
|
8
|
+
# set callstyle last
|
9
|
+
Frame call-display style is last.
|
10
|
+
# set force off
|
11
|
+
force-stepping is off.
|
12
|
+
# step
|
13
|
+
jump2.rb:9
|
14
|
+
def foo2(arg)
|
15
|
+
# step
|
16
|
+
jump2.rb:17
|
17
|
+
def foo1(arg)
|
18
|
+
# step
|
19
|
+
jump2.rb:25
|
20
|
+
foo1(0)
|
21
|
+
# step
|
22
|
+
jump2.rb:18
|
23
|
+
arg = arg + 1
|
24
|
+
# step
|
25
|
+
jump2.rb:19
|
26
|
+
foo2(arg)
|
27
|
+
# step
|
28
|
+
jump2.rb:10
|
29
|
+
arg = arg + 2
|
30
|
+
# step
|
31
|
+
jump2.rb:11
|
32
|
+
foo3(arg)
|
33
|
+
# step
|
34
|
+
jump2.rb:2
|
35
|
+
arg = arg + 3
|
36
|
+
# jump 20
|
37
|
+
jump2.rb:20
|
38
|
+
puts arg
|
39
|
+
# cont
|
40
|
+
1
|
41
|
+
15
|
42
|
+
r3
|
43
|
+
12
|
44
|
+
done
|
@@ -0,0 +1,23 @@
|
|
1
|
+
gcd.rb:4
|
2
|
+
def gcd(a, b)
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests the 'linetrace' command.
|
5
|
+
# # ********************************************************
|
6
|
+
# set basename on
|
7
|
+
basename is on.
|
8
|
+
# set linetrace on
|
9
|
+
line tracing is on.
|
10
|
+
# continue
|
11
|
+
Tracing(1):gcd.rb:18 gcd(3,5)
|
12
|
+
Tracing(1):gcd.rb:6 if a > b
|
13
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
14
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
15
|
+
Tracing(1):gcd.rb:15 gcd(b-a, a)
|
16
|
+
Tracing(1):gcd.rb:6 if a > b
|
17
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
18
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
19
|
+
Tracing(1):gcd.rb:15 gcd(b-a, a)
|
20
|
+
Tracing(1):gcd.rb:6 if a > b
|
21
|
+
Tracing(1):gcd.rb:10 return nil if a <= 0
|
22
|
+
Tracing(1):gcd.rb:12 if a == 1 or b-a == 0
|
23
|
+
Tracing(1):gcd.rb:13 return a
|