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/quit.cmd
ADDED
File without changes
|
data/test/data/raise.cmd
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests that the debugger doesn't step into itself
|
3
|
+
# when the application doesn't terminate the right way.
|
4
|
+
# ********************************************************
|
5
|
+
set debuggertesting on
|
6
|
+
catch x
|
7
|
+
catch ZeroDivisionError
|
8
|
+
info catch
|
9
|
+
catch 5
|
10
|
+
step
|
11
|
+
quit
|
@@ -0,0 +1,23 @@
|
|
1
|
+
raise.rb:3
|
2
|
+
raise "abc"
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests that the debugger doesn't step into itself
|
5
|
+
# # when the application doesn't terminate the right way.
|
6
|
+
# # ********************************************************
|
7
|
+
# set debuggertesting on
|
8
|
+
Currently testing the debugger is on.
|
9
|
+
# catch x
|
10
|
+
NameError Exception: undefined local variable or method `x' for main:Object
|
11
|
+
# catch ZeroDivisionError
|
12
|
+
Catch exception ZeroDivisionError.
|
13
|
+
# info catch
|
14
|
+
ZeroDivisionError
|
15
|
+
# catch 5
|
16
|
+
Warning 5 is not known to be a Class
|
17
|
+
Catch exception 5.
|
18
|
+
# step
|
19
|
+
Catchpoint at raise.rb:3: `abc' (RuntimeError)
|
20
|
+
from ../rdbg.rb:32:in `<main>'
|
21
|
+
raise.rb:3
|
22
|
+
raise "abc"
|
23
|
+
# quit
|
data/test/data/save.cmd
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# This tests the functioning of some set/show debugger commands
|
2
|
+
set debuggertesting on
|
3
|
+
### *******************************
|
4
|
+
### *** save/source commands ***
|
5
|
+
### *******************************
|
6
|
+
########################################
|
7
|
+
### test args and baseneme...
|
8
|
+
########################################
|
9
|
+
set basename off
|
10
|
+
set autoeval off
|
11
|
+
# Should have nothing set
|
12
|
+
info break
|
13
|
+
info catch
|
14
|
+
# Should save nothing
|
15
|
+
save temp
|
16
|
+
eval File.open("temp").readlines
|
17
|
+
# Should read in nothing
|
18
|
+
source temp
|
19
|
+
info break
|
20
|
+
# Now try saving something interesting
|
21
|
+
break 10
|
22
|
+
catch RuntimeError
|
23
|
+
save temp
|
24
|
+
eval File.open("temp").readlines
|
25
|
+
# FIXME: The below is broken
|
26
|
+
## Change parameters above
|
27
|
+
## catch RuntimeError off
|
28
|
+
## info catch
|
29
|
+
##set listsize 55
|
30
|
+
source temp
|
31
|
+
##info break
|
32
|
+
##info catch
|
33
|
+
##show listsize
|
34
|
+
c
|
@@ -0,0 +1,59 @@
|
|
1
|
+
gcd.rb:4
|
2
|
+
def gcd(a, b)
|
3
|
+
# # This tests the functioning of some set/show debugger commands
|
4
|
+
# set debuggertesting on
|
5
|
+
Currently testing the debugger is on.
|
6
|
+
# ### *******************************
|
7
|
+
# ### *** save/source commands ***
|
8
|
+
# ### *******************************
|
9
|
+
# ########################################
|
10
|
+
# ### test args and baseneme...
|
11
|
+
# ########################################
|
12
|
+
# set basename off
|
13
|
+
basename is off.
|
14
|
+
# set autoeval off
|
15
|
+
autoeval is off.
|
16
|
+
# # Should have nothing set
|
17
|
+
# info break
|
18
|
+
No breakpoints.
|
19
|
+
# info catch
|
20
|
+
No exceptions set to be caught.
|
21
|
+
# # Should save nothing
|
22
|
+
# save temp
|
23
|
+
Saved to 'temp'
|
24
|
+
# eval File.open("temp").readlines
|
25
|
+
["set autoeval off\n", "set basename off\n", "set debuggertesting on\n", "set autolist off\n", "set autoirb off\n"]
|
26
|
+
# # Should read in nothing
|
27
|
+
# source temp
|
28
|
+
autoeval is off.
|
29
|
+
basename is off.
|
30
|
+
Currently testing the debugger is on.
|
31
|
+
autolist is off.
|
32
|
+
autoirb is off.
|
33
|
+
# info break
|
34
|
+
No breakpoints.
|
35
|
+
# # Now try saving something interesting
|
36
|
+
# break 10
|
37
|
+
Breakpoint 1 file ./gcd.rb, line 10
|
38
|
+
# catch RuntimeError
|
39
|
+
Catch exception RuntimeError.
|
40
|
+
# save temp
|
41
|
+
Saved to 'temp'
|
42
|
+
# eval File.open("temp").readlines
|
43
|
+
["break ./gcd.rb:10\n", "catch RuntimeError\n", "set autoeval off\n", "set basename on\n", "set debuggertesting on\n", "set autolist off\n", "set autoirb off\n"]
|
44
|
+
# # FIXME: The below is broken
|
45
|
+
# ## Change parameters above
|
46
|
+
# ## catch RuntimeError off
|
47
|
+
# ## info catch
|
48
|
+
# ##set listsize 55
|
49
|
+
# source temp
|
50
|
+
Breakpoint 2 file gcd.rb, line 10
|
51
|
+
Catch exception RuntimeError.
|
52
|
+
autoeval is off.
|
53
|
+
basename is on.
|
54
|
+
Currently testing the debugger is on.
|
55
|
+
autolist is off.
|
56
|
+
autoirb is off.
|
57
|
+
# ##info break
|
58
|
+
# ##info catch
|
59
|
+
# ##show listsize
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests variable display by scope
|
3
|
+
# ********************************************************
|
4
|
+
set debuggertesting on
|
5
|
+
set callstyle last
|
6
|
+
set force off
|
7
|
+
set annotate 3
|
8
|
+
step
|
9
|
+
step
|
10
|
+
step
|
11
|
+
step
|
12
|
+
step
|
13
|
+
step
|
14
|
+
step
|
15
|
+
step
|
16
|
+
step
|
17
|
+
step
|
18
|
+
step
|
19
|
+
step
|
20
|
+
step
|
21
|
+
step
|
22
|
+
step
|
23
|
+
step
|
24
|
+
step
|
25
|
+
step
|
26
|
+
step
|
27
|
+
step
|
28
|
+
step
|
29
|
+
step
|
30
|
+
step
|
31
|
+
step
|
32
|
+
step
|
33
|
+
step
|
34
|
+
step
|
35
|
+
step
|
36
|
+
step
|
37
|
+
step
|
38
|
+
step
|
39
|
+
step
|
40
|
+
step
|
41
|
+
step
|
42
|
+
cont
|
@@ -0,0 +1,587 @@
|
|
1
|
+
scope-var.rb:1
|
2
|
+
require 'ruby_debug'
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests variable display by scope
|
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
|
+
# set annotate 3
|
13
|
+
Annotation level is 3
|
14
|
+
# step
|
15
|
+
starting
|
16
|
+
stopped
|
17
|
+
breakpoints
|
18
|
+
No breakpoints.
|
19
|
+
|
20
|
+
stack
|
21
|
+
--> #0 at line scope-var.rb:2
|
22
|
+
|
23
|
+
variables
|
24
|
+
s0_var1 = nil
|
25
|
+
self = main
|
26
|
+
|
27
|
+
source scope-var.rb:2
|
28
|
+
def scope1(arg1, arg2)
|
29
|
+
# step
|
30
|
+
starting
|
31
|
+
stopped
|
32
|
+
stack
|
33
|
+
--> #0 at line scope-var.rb:8
|
34
|
+
|
35
|
+
variables
|
36
|
+
s0_var1 = nil
|
37
|
+
self = main
|
38
|
+
|
39
|
+
source scope-var.rb:8
|
40
|
+
def scope2
|
41
|
+
# step
|
42
|
+
starting
|
43
|
+
stopped
|
44
|
+
stack
|
45
|
+
--> #0 at line scope-var.rb:17
|
46
|
+
|
47
|
+
variables
|
48
|
+
s0_var1 = nil
|
49
|
+
self = main
|
50
|
+
|
51
|
+
source scope-var.rb:17
|
52
|
+
def scope3
|
53
|
+
# step
|
54
|
+
starting
|
55
|
+
stopped
|
56
|
+
stack
|
57
|
+
--> #0 at line scope-var.rb:28
|
58
|
+
|
59
|
+
variables
|
60
|
+
s0_var1 = nil
|
61
|
+
self = main
|
62
|
+
|
63
|
+
source scope-var.rb:28
|
64
|
+
s0_var1 = 1357;
|
65
|
+
# step
|
66
|
+
starting
|
67
|
+
stopped
|
68
|
+
stack
|
69
|
+
--> #0 at line scope-var.rb:29
|
70
|
+
|
71
|
+
variables
|
72
|
+
s0_var1 = 1357
|
73
|
+
self = main
|
74
|
+
|
75
|
+
source scope-var.rb:29
|
76
|
+
scope1(111, 222)
|
77
|
+
# step
|
78
|
+
starting
|
79
|
+
stopped
|
80
|
+
stack
|
81
|
+
--> #0 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:3
|
82
|
+
#1 at line scope-var.rb:29
|
83
|
+
|
84
|
+
variables
|
85
|
+
arg1 = 111
|
86
|
+
arg2 = 222
|
87
|
+
s1_var1 = nil
|
88
|
+
s1_var2 = nil
|
89
|
+
self = main
|
90
|
+
|
91
|
+
source scope-var.rb:3
|
92
|
+
s1_var1 = 123
|
93
|
+
# step
|
94
|
+
starting
|
95
|
+
stopped
|
96
|
+
stack
|
97
|
+
--> #0 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:4
|
98
|
+
#1 at line scope-var.rb:29
|
99
|
+
|
100
|
+
variables
|
101
|
+
arg1 = 111
|
102
|
+
arg2 = 222
|
103
|
+
s1_var1 = 123
|
104
|
+
s1_var2 = nil
|
105
|
+
self = main
|
106
|
+
|
107
|
+
source scope-var.rb:4
|
108
|
+
s1_var2 = "scope1"
|
109
|
+
# step
|
110
|
+
starting
|
111
|
+
stopped
|
112
|
+
stack
|
113
|
+
--> #0 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
114
|
+
#1 at line scope-var.rb:29
|
115
|
+
|
116
|
+
variables
|
117
|
+
arg1 = 111
|
118
|
+
arg2 = 222
|
119
|
+
s1_var1 = 123
|
120
|
+
s1_var2 = "scope1"
|
121
|
+
self = main
|
122
|
+
|
123
|
+
source scope-var.rb:5
|
124
|
+
scope2
|
125
|
+
# step
|
126
|
+
starting
|
127
|
+
stopped
|
128
|
+
stack
|
129
|
+
--> #0 Object.scope2 at line scope-var.rb:9
|
130
|
+
#1 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
131
|
+
#2 at line scope-var.rb:29
|
132
|
+
|
133
|
+
variables
|
134
|
+
s2_var1 = nil
|
135
|
+
s2_var2 = nil
|
136
|
+
self = main
|
137
|
+
|
138
|
+
source scope-var.rb:9
|
139
|
+
s2_var1 = 456
|
140
|
+
# step
|
141
|
+
starting
|
142
|
+
stopped
|
143
|
+
stack
|
144
|
+
--> #0 Object.scope2 at line scope-var.rb:10
|
145
|
+
#1 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
146
|
+
#2 at line scope-var.rb:29
|
147
|
+
|
148
|
+
variables
|
149
|
+
s2_var1 = 456
|
150
|
+
s2_var2 = nil
|
151
|
+
self = main
|
152
|
+
|
153
|
+
source scope-var.rb:10
|
154
|
+
s2_var2 = "scope2"
|
155
|
+
# step
|
156
|
+
starting
|
157
|
+
stopped
|
158
|
+
stack
|
159
|
+
--> #0 Object.scope2 at line scope-var.rb:11
|
160
|
+
#1 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
161
|
+
#2 at line scope-var.rb:29
|
162
|
+
|
163
|
+
variables
|
164
|
+
s2_var1 = 456
|
165
|
+
s2_var2 = "scope2"
|
166
|
+
self = main
|
167
|
+
|
168
|
+
source scope-var.rb:11
|
169
|
+
0.upto(5) do |i|
|
170
|
+
# step
|
171
|
+
starting
|
172
|
+
stopped
|
173
|
+
stack
|
174
|
+
--> #0 at line scope-var.rb:12
|
175
|
+
#1 Object.scope2 at line scope-var.rb:11
|
176
|
+
#2 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
177
|
+
#3 at line scope-var.rb:29
|
178
|
+
|
179
|
+
variables
|
180
|
+
i = 0
|
181
|
+
j = nil
|
182
|
+
self = main
|
183
|
+
|
184
|
+
source scope-var.rb:12
|
185
|
+
j = i * 10
|
186
|
+
# step
|
187
|
+
starting
|
188
|
+
stopped
|
189
|
+
stack
|
190
|
+
--> #0 at line scope-var.rb:13
|
191
|
+
#1 Object.scope2 at line scope-var.rb:11
|
192
|
+
#2 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
193
|
+
#3 at line scope-var.rb:29
|
194
|
+
|
195
|
+
variables
|
196
|
+
i = 0
|
197
|
+
j = 0
|
198
|
+
self = main
|
199
|
+
|
200
|
+
source scope-var.rb:13
|
201
|
+
scope3
|
202
|
+
# step
|
203
|
+
starting
|
204
|
+
stopped
|
205
|
+
stack
|
206
|
+
--> #0 Object.scope3 at line scope-var.rb:18
|
207
|
+
#1 at line scope-var.rb:13
|
208
|
+
#2 Object.scope2 at line scope-var.rb:11
|
209
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
210
|
+
#4 at line scope-var.rb:29
|
211
|
+
|
212
|
+
variables
|
213
|
+
s3_var1 = nil
|
214
|
+
s3_var2 = nil
|
215
|
+
self = main
|
216
|
+
|
217
|
+
source scope-var.rb:18
|
218
|
+
s3_var1 = 789
|
219
|
+
# step
|
220
|
+
starting
|
221
|
+
stopped
|
222
|
+
stack
|
223
|
+
--> #0 Object.scope3 at line scope-var.rb:19
|
224
|
+
#1 at line scope-var.rb:13
|
225
|
+
#2 Object.scope2 at line scope-var.rb:11
|
226
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
227
|
+
#4 at line scope-var.rb:29
|
228
|
+
|
229
|
+
variables
|
230
|
+
s3_var1 = 789
|
231
|
+
s3_var2 = nil
|
232
|
+
self = main
|
233
|
+
|
234
|
+
source scope-var.rb:19
|
235
|
+
s3_var2 = "scope3"
|
236
|
+
# step
|
237
|
+
starting
|
238
|
+
stopped
|
239
|
+
stack
|
240
|
+
--> #0 Object.scope3 at line scope-var.rb:20
|
241
|
+
#1 at line scope-var.rb:13
|
242
|
+
#2 Object.scope2 at line scope-var.rb:11
|
243
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
244
|
+
#4 at line scope-var.rb:29
|
245
|
+
|
246
|
+
variables
|
247
|
+
s3_var1 = 789
|
248
|
+
s3_var2 = "scope3"
|
249
|
+
self = main
|
250
|
+
|
251
|
+
source scope-var.rb:20
|
252
|
+
puts eval("s3_var1", Debugger.current_context.frame_binding(0))
|
253
|
+
# step
|
254
|
+
starting
|
255
|
+
stopped
|
256
|
+
stack
|
257
|
+
--> #0 at line (eval):1
|
258
|
+
#1 Object.scope3 at line scope-var.rb:20
|
259
|
+
#2 at line scope-var.rb:13
|
260
|
+
#3 Object.scope2 at line scope-var.rb:11
|
261
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
262
|
+
#5 at line scope-var.rb:29
|
263
|
+
|
264
|
+
variables
|
265
|
+
self = main
|
266
|
+
|
267
|
+
source (eval):1
|
268
|
+
|
269
|
+
# step
|
270
|
+
starting
|
271
|
+
789
|
272
|
+
stopped
|
273
|
+
stack
|
274
|
+
--> #0 Object.scope3 at line scope-var.rb:21
|
275
|
+
#1 at line scope-var.rb:13
|
276
|
+
#2 Object.scope2 at line scope-var.rb:11
|
277
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
278
|
+
#4 at line scope-var.rb:29
|
279
|
+
|
280
|
+
variables
|
281
|
+
s3_var1 = 789
|
282
|
+
s3_var2 = "scope3"
|
283
|
+
self = main
|
284
|
+
|
285
|
+
source scope-var.rb:21
|
286
|
+
puts eval("i", Debugger.current_context.frame_binding(1))
|
287
|
+
# step
|
288
|
+
starting
|
289
|
+
stopped
|
290
|
+
stack
|
291
|
+
--> #0 at line (eval):1
|
292
|
+
#1 Object.scope3 at line scope-var.rb:21
|
293
|
+
#2 at line scope-var.rb:13
|
294
|
+
#3 Object.scope2 at line scope-var.rb:11
|
295
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
296
|
+
#5 at line scope-var.rb:29
|
297
|
+
|
298
|
+
variables
|
299
|
+
self = main
|
300
|
+
|
301
|
+
source (eval):1
|
302
|
+
|
303
|
+
# step
|
304
|
+
starting
|
305
|
+
0
|
306
|
+
stopped
|
307
|
+
stack
|
308
|
+
--> #0 Object.scope3 at line scope-var.rb:22
|
309
|
+
#1 at line scope-var.rb:13
|
310
|
+
#2 Object.scope2 at line scope-var.rb:11
|
311
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
312
|
+
#4 at line scope-var.rb:29
|
313
|
+
|
314
|
+
variables
|
315
|
+
s3_var1 = 789
|
316
|
+
s3_var2 = "scope3"
|
317
|
+
self = main
|
318
|
+
|
319
|
+
source scope-var.rb:22
|
320
|
+
puts eval("j", Debugger.current_context.frame_binding(1))
|
321
|
+
# step
|
322
|
+
starting
|
323
|
+
stopped
|
324
|
+
stack
|
325
|
+
--> #0 at line (eval):1
|
326
|
+
#1 Object.scope3 at line scope-var.rb:22
|
327
|
+
#2 at line scope-var.rb:13
|
328
|
+
#3 Object.scope2 at line scope-var.rb:11
|
329
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
330
|
+
#5 at line scope-var.rb:29
|
331
|
+
|
332
|
+
variables
|
333
|
+
self = main
|
334
|
+
|
335
|
+
source (eval):1
|
336
|
+
|
337
|
+
# step
|
338
|
+
starting
|
339
|
+
0
|
340
|
+
stopped
|
341
|
+
stack
|
342
|
+
--> #0 Object.scope3 at line scope-var.rb:23
|
343
|
+
#1 at line scope-var.rb:13
|
344
|
+
#2 Object.scope2 at line scope-var.rb:11
|
345
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
346
|
+
#4 at line scope-var.rb:29
|
347
|
+
|
348
|
+
variables
|
349
|
+
s3_var1 = 789
|
350
|
+
s3_var2 = "scope3"
|
351
|
+
self = main
|
352
|
+
|
353
|
+
source scope-var.rb:23
|
354
|
+
puts eval("s2_var1", Debugger.current_context.frame_binding(2))
|
355
|
+
# step
|
356
|
+
starting
|
357
|
+
stopped
|
358
|
+
stack
|
359
|
+
--> #0 at line (eval):1
|
360
|
+
#1 Object.scope3 at line scope-var.rb:23
|
361
|
+
#2 at line scope-var.rb:13
|
362
|
+
#3 Object.scope2 at line scope-var.rb:11
|
363
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
364
|
+
#5 at line scope-var.rb:29
|
365
|
+
|
366
|
+
variables
|
367
|
+
self = main
|
368
|
+
|
369
|
+
source (eval):1
|
370
|
+
|
371
|
+
# step
|
372
|
+
starting
|
373
|
+
456
|
374
|
+
stopped
|
375
|
+
stack
|
376
|
+
--> #0 Object.scope3 at line scope-var.rb:24
|
377
|
+
#1 at line scope-var.rb:13
|
378
|
+
#2 Object.scope2 at line scope-var.rb:11
|
379
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
380
|
+
#4 at line scope-var.rb:29
|
381
|
+
|
382
|
+
variables
|
383
|
+
s3_var1 = 789
|
384
|
+
s3_var2 = "scope3"
|
385
|
+
self = main
|
386
|
+
|
387
|
+
source scope-var.rb:24
|
388
|
+
puts eval("s1_var1", Debugger.current_context.frame_binding(3))
|
389
|
+
# step
|
390
|
+
starting
|
391
|
+
stopped
|
392
|
+
stack
|
393
|
+
--> #0 at line (eval):1
|
394
|
+
#1 Object.scope3 at line scope-var.rb:24
|
395
|
+
#2 at line scope-var.rb:13
|
396
|
+
#3 Object.scope2 at line scope-var.rb:11
|
397
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
398
|
+
#5 at line scope-var.rb:29
|
399
|
+
|
400
|
+
variables
|
401
|
+
self = main
|
402
|
+
|
403
|
+
source (eval):1
|
404
|
+
|
405
|
+
# step
|
406
|
+
starting
|
407
|
+
123
|
408
|
+
stopped
|
409
|
+
stack
|
410
|
+
--> #0 Object.scope3 at line scope-var.rb:25
|
411
|
+
#1 at line scope-var.rb:13
|
412
|
+
#2 Object.scope2 at line scope-var.rb:11
|
413
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
414
|
+
#4 at line scope-var.rb:29
|
415
|
+
|
416
|
+
variables
|
417
|
+
s3_var1 = 789
|
418
|
+
s3_var2 = "scope3"
|
419
|
+
self = main
|
420
|
+
|
421
|
+
source scope-var.rb:25
|
422
|
+
puts eval("s0_var1", Debugger.current_context.frame_binding(4))
|
423
|
+
# step
|
424
|
+
starting
|
425
|
+
stopped
|
426
|
+
stack
|
427
|
+
--> #0 at line (eval):1
|
428
|
+
#1 Object.scope3 at line scope-var.rb:25
|
429
|
+
#2 at line scope-var.rb:13
|
430
|
+
#3 Object.scope2 at line scope-var.rb:11
|
431
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
432
|
+
#5 at line scope-var.rb:29
|
433
|
+
|
434
|
+
variables
|
435
|
+
self = main
|
436
|
+
|
437
|
+
source (eval):1
|
438
|
+
|
439
|
+
# step
|
440
|
+
starting
|
441
|
+
1357
|
442
|
+
stopped
|
443
|
+
stack
|
444
|
+
--> #0 at line scope-var.rb:12
|
445
|
+
#1 Object.scope2 at line scope-var.rb:11
|
446
|
+
#2 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
447
|
+
#3 at line scope-var.rb:29
|
448
|
+
|
449
|
+
variables
|
450
|
+
i = 1
|
451
|
+
j = nil
|
452
|
+
self = main
|
453
|
+
|
454
|
+
source scope-var.rb:12
|
455
|
+
j = i * 10
|
456
|
+
# step
|
457
|
+
starting
|
458
|
+
stopped
|
459
|
+
stack
|
460
|
+
--> #0 at line scope-var.rb:13
|
461
|
+
#1 Object.scope2 at line scope-var.rb:11
|
462
|
+
#2 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
463
|
+
#3 at line scope-var.rb:29
|
464
|
+
|
465
|
+
variables
|
466
|
+
i = 1
|
467
|
+
j = 10
|
468
|
+
self = main
|
469
|
+
|
470
|
+
source scope-var.rb:13
|
471
|
+
scope3
|
472
|
+
# step
|
473
|
+
starting
|
474
|
+
stopped
|
475
|
+
stack
|
476
|
+
--> #0 Object.scope3 at line scope-var.rb:18
|
477
|
+
#1 at line scope-var.rb:13
|
478
|
+
#2 Object.scope2 at line scope-var.rb:11
|
479
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
480
|
+
#4 at line scope-var.rb:29
|
481
|
+
|
482
|
+
variables
|
483
|
+
s3_var1 = nil
|
484
|
+
s3_var2 = nil
|
485
|
+
self = main
|
486
|
+
|
487
|
+
source scope-var.rb:18
|
488
|
+
s3_var1 = 789
|
489
|
+
# step
|
490
|
+
starting
|
491
|
+
stopped
|
492
|
+
stack
|
493
|
+
--> #0 Object.scope3 at line scope-var.rb:19
|
494
|
+
#1 at line scope-var.rb:13
|
495
|
+
#2 Object.scope2 at line scope-var.rb:11
|
496
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
497
|
+
#4 at line scope-var.rb:29
|
498
|
+
|
499
|
+
variables
|
500
|
+
s3_var1 = 789
|
501
|
+
s3_var2 = nil
|
502
|
+
self = main
|
503
|
+
|
504
|
+
source scope-var.rb:19
|
505
|
+
s3_var2 = "scope3"
|
506
|
+
# step
|
507
|
+
starting
|
508
|
+
stopped
|
509
|
+
stack
|
510
|
+
--> #0 Object.scope3 at line scope-var.rb:20
|
511
|
+
#1 at line scope-var.rb:13
|
512
|
+
#2 Object.scope2 at line scope-var.rb:11
|
513
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
514
|
+
#4 at line scope-var.rb:29
|
515
|
+
|
516
|
+
variables
|
517
|
+
s3_var1 = 789
|
518
|
+
s3_var2 = "scope3"
|
519
|
+
self = main
|
520
|
+
|
521
|
+
source scope-var.rb:20
|
522
|
+
puts eval("s3_var1", Debugger.current_context.frame_binding(0))
|
523
|
+
# step
|
524
|
+
starting
|
525
|
+
stopped
|
526
|
+
stack
|
527
|
+
--> #0 at line (eval):1
|
528
|
+
#1 Object.scope3 at line scope-var.rb:20
|
529
|
+
#2 at line scope-var.rb:13
|
530
|
+
#3 Object.scope2 at line scope-var.rb:11
|
531
|
+
#4 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
532
|
+
#5 at line scope-var.rb:29
|
533
|
+
|
534
|
+
variables
|
535
|
+
self = main
|
536
|
+
|
537
|
+
source (eval):1
|
538
|
+
|
539
|
+
# step
|
540
|
+
starting
|
541
|
+
789
|
542
|
+
stopped
|
543
|
+
stack
|
544
|
+
--> #0 Object.scope3 at line scope-var.rb:21
|
545
|
+
#1 at line scope-var.rb:13
|
546
|
+
#2 Object.scope2 at line scope-var.rb:11
|
547
|
+
#3 Object.scope1(arg1#Fixnum, arg2#Fixnum) at line scope-var.rb:5
|
548
|
+
#4 at line scope-var.rb:29
|
549
|
+
|
550
|
+
variables
|
551
|
+
s3_var1 = 789
|
552
|
+
s3_var2 = "scope3"
|
553
|
+
self = main
|
554
|
+
|
555
|
+
source scope-var.rb:21
|
556
|
+
puts eval("i", Debugger.current_context.frame_binding(1))
|
557
|
+
# cont
|
558
|
+
starting
|
559
|
+
1
|
560
|
+
10
|
561
|
+
456
|
562
|
+
123
|
563
|
+
1357
|
564
|
+
789
|
565
|
+
2
|
566
|
+
20
|
567
|
+
456
|
568
|
+
123
|
569
|
+
1357
|
570
|
+
789
|
571
|
+
3
|
572
|
+
30
|
573
|
+
456
|
574
|
+
123
|
575
|
+
1357
|
576
|
+
789
|
577
|
+
4
|
578
|
+
40
|
579
|
+
456
|
580
|
+
123
|
581
|
+
1357
|
582
|
+
789
|
583
|
+
5
|
584
|
+
50
|
585
|
+
456
|
586
|
+
123
|
587
|
+
1357
|