ruby-debug 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +94 -2
- data/ChangeLog +5225 -0
- data/README +30 -1
- data/Rakefile +55 -24
- data/bin/rdebug +249 -128
- data/cli/ruby-debug/command.rb +30 -3
- data/cli/ruby-debug/commands/breakpoints.rb +54 -24
- data/cli/ruby-debug/commands/catchpoint.rb +13 -12
- data/cli/ruby-debug/commands/condition.rb +49 -0
- data/cli/ruby-debug/commands/continue.rb +32 -0
- data/cli/ruby-debug/commands/control.rb +19 -43
- data/cli/ruby-debug/commands/disassemble.RB +38 -0
- data/cli/ruby-debug/commands/display.rb +1 -1
- data/cli/ruby-debug/commands/edit.rb +48 -0
- data/cli/ruby-debug/commands/enable.rb +78 -35
- data/cli/ruby-debug/commands/eval.rb +6 -5
- data/cli/ruby-debug/commands/finish.rb +42 -0
- data/cli/ruby-debug/commands/frame.rb +64 -33
- data/cli/ruby-debug/commands/help.rb +19 -15
- data/cli/ruby-debug/commands/info.rb +295 -36
- data/cli/ruby-debug/commands/irb.rb +3 -1
- data/cli/ruby-debug/commands/list.rb +27 -50
- data/cli/ruby-debug/commands/quit.rb +38 -0
- data/cli/ruby-debug/commands/reload.rb +40 -0
- data/cli/ruby-debug/commands/save.rb +80 -0
- data/cli/ruby-debug/commands/{settings.rb → set.rb} +50 -12
- data/cli/ruby-debug/commands/show.rb +83 -27
- data/cli/ruby-debug/commands/source.rb +36 -0
- data/cli/ruby-debug/commands/stepping.rb +36 -72
- data/cli/ruby-debug/commands/threads.rb +32 -23
- data/cli/ruby-debug/commands/variables.rb +34 -4
- data/cli/ruby-debug/helper.rb +10 -75
- data/cli/ruby-debug/interface.rb +72 -9
- data/cli/ruby-debug/processor.rb +203 -100
- data/doc/rdebug.1 +7 -2
- data/rdbg.rb +33 -0
- data/test/{test-ruby-debug-base.rb → base/base.rb} +27 -29
- data/test/base/binding.rb +31 -0
- data/test/base/catchpoint.rb +26 -0
- data/test/base/load.rb +40 -0
- data/test/data/annotate.cmd +29 -0
- data/test/data/annotate.right +137 -0
- data/test/data/break_bad.cmd +18 -0
- data/test/data/break_bad.right +28 -0
- data/test/data/breakpoints.cmd +38 -0
- data/test/data/breakpoints.right +98 -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 +69 -0
- data/test/{display.cmd → data/display.cmd} +7 -1
- data/test/{display.right → data/display.right} +13 -6
- 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/{breakpoints.cmd → data/emacs_basic.cmd} +0 -0
- data/test/{breakpoints.right → data/emacs_basic.right} +24 -12
- 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 +43 -0
- data/test/{frame.cmd → data/frame.cmd} +2 -0
- data/test/{frame.right → data/frame.right} +8 -2
- data/test/{help.cmd → data/help.cmd} +8 -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/{info-var.cmd → data/info-var.cmd} +3 -3
- data/test/{info-var.right → data/info-var.right} +20 -15
- data/test/{info.cmd → data/info.cmd} +10 -1
- data/test/data/info.right +65 -0
- data/test/data/linetrace.cmd +6 -0
- data/test/data/linetrace.right +32 -0
- data/test/data/linetracep.cmd +7 -0
- data/test/data/linetracep.right +25 -0
- data/test/data/list.cmd +19 -0
- data/test/data/list.right +127 -0
- data/test/data/noquit.right +1 -0
- data/test/data/output.cmd +6 -0
- data/test/data/output.right +41 -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 +31 -0
- data/test/{quit.cmd → data/quit.cmd} +2 -5
- data/test/data/quit.right +9 -0
- data/test/data/raise.cmd +11 -0
- data/test/data/raise.right +26 -0
- data/test/{setshow.cmd → data/setshow.cmd} +0 -1
- data/test/{setshow.right → data/setshow.right} +0 -1
- data/test/data/source.cmd +5 -0
- data/test/data/source.right +15 -0
- data/test/{stepping.cmd → data/stepping.cmd} +6 -2
- data/test/{stepping.right → data/stepping.right} +13 -3
- 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 +23 -0
- data/test/dollar-0.rb +5 -0
- data/test/except-bug2.rb +7 -0
- data/test/gcd-dbg-nox.rb +31 -0
- data/test/gcd-dbg.rb +30 -0
- data/test/helper.rb +44 -14
- data/test/info-var-bug.rb +2 -0
- data/test/info-var-bug2.rb +2 -0
- data/test/null.rb +1 -0
- data/test/output.rb +2 -0
- data/test/pm-base.rb +22 -0
- data/test/pm.rb +11 -0
- data/test/raise.rb +3 -0
- data/test/tdebug.rb +88 -40
- data/test/test-annotate.rb +25 -0
- data/test/test-break-bad.rb +25 -0
- data/test/test-breakpoints.rb +14 -17
- data/test/test-condition.rb +25 -0
- data/test/test-ctrl.rb +54 -0
- data/test/test-display.rb +15 -15
- data/test/test-dollar-0.rb +39 -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 +15 -16
- data/test/test-help.rb +34 -18
- data/test/test-hist.rb +68 -0
- data/test/test-info-thread.rb +32 -0
- data/test/test-info-var.rb +28 -14
- data/test/test-info.rb +15 -17
- data/test/test-init.rb +41 -0
- data/test/test-list.rb +25 -0
- data/test/test-output.rb +26 -0
- data/test/test-pm.rb +46 -0
- data/test/test-quit.rb +19 -17
- data/test/test-raise.rb +25 -0
- data/test/test-setshow.rb +14 -13
- data/test/test-source.rb +25 -0
- data/test/test-stepping.rb +14 -14
- data/test/test-trace.rb +63 -0
- data/test/thread1.rb +26 -0
- metadata +125 -31
- data/cli/ruby-debug/commands/script.rb +0 -64
- data/runner.sh +0 -7
- data/test/help.right +0 -4
- data/test/info.right +0 -35
- data/test/quit.right +0 -22
- data/test/test-columnize.rb +0 -46
data/doc/rdebug.1
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
.\" $Id: rdebug.1
|
1
|
+
.\" $Id: rdebug.1 516 2007-12-31 05:55:24Z rockyb $
|
2
2
|
.TH rdebug 1
|
3
3
|
.SH NAME
|
4
4
|
rdebug \- Fast Ruby debugger
|
@@ -165,6 +165,11 @@ Port used for control commands.
|
|
165
165
|
Set $DEBUG true.
|
166
166
|
.TP
|
167
167
|
.B \-\-emacs
|
168
|
+
Activates full GNU Emacs mode. Is the equivalent of setting the
|
169
|
+
options \-\-emacs\-basic, \-\-annotate=3, \-\-no-stop, \-\-no\-control
|
170
|
+
and \-\-post\-mortem.
|
171
|
+
.TP
|
172
|
+
.B \-\-emacs-basic
|
168
173
|
Activates GNU Emacs mode. Debugger prompts are prefaced with two octal
|
169
174
|
032 characters.
|
170
175
|
.TP
|
@@ -180,7 +185,7 @@ Activate post-mortem mode.
|
|
180
185
|
.B \-\-no-control
|
181
186
|
Do not automatically start control thread.
|
182
187
|
.TP
|
183
|
-
.B
|
188
|
+
.B \-\-no\-stop
|
184
189
|
Do not stop when script is loaded.
|
185
190
|
.TP
|
186
191
|
.B \-p | \-\-port=PORT
|
data/rdbg.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#!/usr/bin/env ruby
|
3
|
+
# $Id: rdbg.rb 756 2008-03-13 02:15:04Z rockyb $
|
4
|
+
|
5
|
+
# Use this to run rdebug without installing it. We assume that the
|
6
|
+
# library directories are stored at the same level the directory
|
7
|
+
# this program.
|
8
|
+
module RDebugRunner
|
9
|
+
def runner(stdout=nil)
|
10
|
+
|
11
|
+
# Add libraries to load path.
|
12
|
+
dirname=File.dirname(__FILE__)
|
13
|
+
libs = %w(ext lib cli)
|
14
|
+
libs.each { |lib| $:.unshift File.join(dirname, lib) }
|
15
|
+
|
16
|
+
rdebug=ENV['RDEBUG'] || File.join(dirname, 'bin', 'rdebug')
|
17
|
+
if stdout
|
18
|
+
old_stdout = $stdout
|
19
|
+
$stdout.reopen(stdout)
|
20
|
+
else
|
21
|
+
old_stdout = nil
|
22
|
+
end
|
23
|
+
load(rdebug, true)
|
24
|
+
$stdout.reopen(old_stdout) if old_stdout
|
25
|
+
|
26
|
+
# Remove those libraries we just added.
|
27
|
+
1.upto(libs.size) {$:.shift}
|
28
|
+
end
|
29
|
+
module_function :runner
|
30
|
+
end
|
31
|
+
if __FILE__ == $0
|
32
|
+
RDebugRunner.runner
|
33
|
+
end
|
@@ -1,75 +1,73 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require
|
2
|
+
require 'test/unit'
|
3
3
|
|
4
|
-
|
5
|
-
$: << File.expand_path(File.dirname(__FILE__)) + '/../lib'
|
6
|
-
require "ruby_debug"
|
7
|
-
|
8
|
-
# Test of C extension ruby_debug.so
|
4
|
+
# Some tests of Debugger module in C extension ruby_debug
|
9
5
|
class TestRubyDebug < Test::Unit::TestCase
|
10
|
-
|
6
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
|
7
|
+
require 'ruby_debug'
|
8
|
+
$:.shift
|
11
9
|
|
12
10
|
# test current_context
|
13
11
|
def test_current_context
|
14
12
|
assert_equal(false, Debugger.started?,
|
15
|
-
|
16
|
-
Debugger.
|
13
|
+
'debugger should not initially be started.')
|
14
|
+
Debugger.start_
|
17
15
|
assert(Debugger.started?,
|
18
|
-
|
19
|
-
assert_equal(
|
16
|
+
'debugger should now be started.')
|
17
|
+
assert_equal(__LINE__, Debugger.current_context.frame_line)
|
20
18
|
assert_equal(nil, Debugger.current_context.frame_args_info,
|
21
|
-
|
19
|
+
'no frame args info.')
|
22
20
|
assert_equal(Debugger.current_context.frame_file,
|
23
21
|
Debugger.current_context.frame_file(0))
|
24
|
-
assert_equal(
|
22
|
+
assert_equal(File.basename(__FILE__),
|
25
23
|
File.basename(Debugger.current_context.frame_file))
|
26
24
|
assert_raises(ArgumentError) {Debugger.current_context.frame_file(1, 2)}
|
27
25
|
assert_raises(ArgumentError) {Debugger.current_context.frame_file(10)}
|
28
26
|
assert_equal(1, Debugger.current_context.stack_size)
|
29
27
|
assert_equal(TestRubyDebug, Debugger.current_context.frame_class)
|
30
|
-
assert_equal(false, Debugger.current_context.dead?,
|
28
|
+
assert_equal(false, Debugger.current_context.dead?, 'Not dead yet!')
|
31
29
|
Debugger.stop
|
32
30
|
assert_equal(false, Debugger.started?,
|
33
|
-
|
31
|
+
'Debugger should no longer be started.')
|
34
32
|
end
|
35
33
|
|
36
34
|
# Test initial variables and setting/getting state.
|
37
35
|
def test_debugger_base
|
38
36
|
assert_equal(false, Debugger.started?,
|
39
|
-
|
40
|
-
Debugger.
|
37
|
+
'Debugger should not initially be started.')
|
38
|
+
Debugger.start_
|
41
39
|
assert(Debugger.started?,
|
42
|
-
|
40
|
+
'Debugger should now be started.')
|
43
41
|
assert_equal(false, Debugger.debug,
|
44
|
-
|
42
|
+
'Debug variable should not be set.')
|
45
43
|
assert_equal(false, Debugger.post_mortem?,
|
46
|
-
|
44
|
+
'Post mortem debugging should not be set.')
|
47
45
|
a = Debugger.contexts
|
48
46
|
assert_equal(1, a.size,
|
49
|
-
|
47
|
+
'There should only be one context.')
|
50
48
|
assert_equal(Array, a.class,
|
51
|
-
|
49
|
+
'Context should be an array.')
|
52
50
|
Debugger.stop
|
53
51
|
assert_equal(false, Debugger.started?,
|
54
|
-
|
52
|
+
'debugger should no longer be started.')
|
55
53
|
end
|
56
54
|
|
57
55
|
# Test breakpoint handling
|
58
56
|
def test_breakpoints
|
59
|
-
Debugger.
|
57
|
+
Debugger.start_
|
60
58
|
assert_equal(0, Debugger.breakpoints.size,
|
61
|
-
|
59
|
+
'There should not be any breakpoints set.')
|
62
60
|
brk = Debugger.add_breakpoint(__FILE__, 1)
|
63
61
|
assert_equal(Debugger::Breakpoint, brk.class,
|
64
|
-
|
62
|
+
'Breakpoint should have been set and returned.')
|
65
63
|
assert_equal(1, Debugger.breakpoints.size,
|
66
|
-
|
64
|
+
'There should now be one breakpoint set.')
|
67
65
|
Debugger.remove_breakpoint(0)
|
68
66
|
assert_equal(1, Debugger.breakpoints.size,
|
69
|
-
|
67
|
+
'There should still be one breakpoint set.')
|
70
68
|
Debugger.remove_breakpoint(1)
|
71
69
|
assert_equal(0, Debugger.breakpoints.size,
|
72
|
-
|
70
|
+
'There should no longer be any breakpoints set.')
|
73
71
|
Debugger.stop
|
74
72
|
end
|
75
73
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
# Test binding_n command
|
6
|
+
class TestBinding < Test::Unit::TestCase
|
7
|
+
|
8
|
+
SRC_DIR = File.expand_path(File.dirname(__FILE__)) unless
|
9
|
+
defined?(SRC_DIR)
|
10
|
+
%w(ext lib).each do |dir|
|
11
|
+
$:.unshift File.join(SRC_DIR, '..', '..', dir)
|
12
|
+
end
|
13
|
+
require File.join(SRC_DIR, '..', '..', 'lib', 'ruby-debug-base')
|
14
|
+
$:.shift; $:.shift
|
15
|
+
|
16
|
+
def test_basic
|
17
|
+
def inside_fn
|
18
|
+
s = 'some other string'
|
19
|
+
b2 = Kernel::binding_n(1)
|
20
|
+
y2 = eval('s', b2)
|
21
|
+
assert_equal('this is a test', y2)
|
22
|
+
end
|
23
|
+
s = 'this is a test'
|
24
|
+
Debugger.start
|
25
|
+
b = Kernel::binding_n(0)
|
26
|
+
y = eval('s', b)
|
27
|
+
assert_equal(y, s)
|
28
|
+
inside_fn
|
29
|
+
Debugger.stop
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# Test catchpoint in C ruby_debug extension.
|
5
|
+
|
6
|
+
class TestRubyDebugCatchpoint < Test::Unit::TestCase
|
7
|
+
|
8
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'ext')
|
9
|
+
require 'ruby_debug'
|
10
|
+
$:.shift
|
11
|
+
|
12
|
+
# test current_context
|
13
|
+
def test_catchpoints
|
14
|
+
assert_raise(RuntimeError) {Debugger.catchpoints}
|
15
|
+
Debugger.start_
|
16
|
+
assert_equal({}, Debugger.catchpoints)
|
17
|
+
Debugger.add_catchpoint('ZeroDivisionError')
|
18
|
+
assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
|
19
|
+
Debugger.add_catchpoint('RuntimeError')
|
20
|
+
assert_equal(['RuntimeError', 'ZeroDivisionError'],
|
21
|
+
Debugger.catchpoints.keys.sort)
|
22
|
+
Debugger.stop
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
data/test/base/load.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# Test of Debugger.debug_load in C extension ruby_debug.so
|
5
|
+
class TestDebugLoad < Test::Unit::TestCase
|
6
|
+
|
7
|
+
@@src_dir = File.dirname(__FILE__)
|
8
|
+
$:.unshift File.join(@@src_dir, '..', '..', 'ext')
|
9
|
+
require 'ruby_debug'
|
10
|
+
$:.shift
|
11
|
+
|
12
|
+
class << self
|
13
|
+
def at_line(file, line)
|
14
|
+
@@at_line = [File.basename(file), line]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Debugger::PROG_SCRIPT = File.join(@@src_dir, '..', 'gcd.rb')
|
19
|
+
|
20
|
+
class Debugger::Context
|
21
|
+
def at_line(file, line)
|
22
|
+
TestDebugLoad::at_line(file, line)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_debug_load
|
27
|
+
# Without stopping
|
28
|
+
bt = Debugger.debug_load(Debugger::PROG_SCRIPT, false)
|
29
|
+
assert_equal(nil, bt)
|
30
|
+
# With stopping
|
31
|
+
bt = Debugger.debug_load(Debugger::PROG_SCRIPT, true)
|
32
|
+
assert_equal(nil, bt)
|
33
|
+
assert_equal(['gcd.rb', 4], @@at_line)
|
34
|
+
|
35
|
+
# Test that we get a proper backtrace on a script that raises 'abc'
|
36
|
+
prog_script = File.join(@@src_dir, '..', 'raise.rb')
|
37
|
+
bt = Debugger.debug_load(prog_script, false)
|
38
|
+
assert_equal(bt.to_s, 'abc')
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests annotations
|
3
|
+
# ********************************************************
|
4
|
+
set debuggertesting on
|
5
|
+
set callstyle last
|
6
|
+
set force off
|
7
|
+
set annotate 3
|
8
|
+
# Get into gcd
|
9
|
+
step 2
|
10
|
+
# "break" should trigger break annotation
|
11
|
+
break 10
|
12
|
+
# "delete" should trigger break annotation
|
13
|
+
delete 1
|
14
|
+
# p should not trigger a breakpoint annotation
|
15
|
+
p a
|
16
|
+
# "up" should trigger annotations
|
17
|
+
up
|
18
|
+
# "b" should trigger like "break"
|
19
|
+
b 12
|
20
|
+
# "display" should trigger display annotation
|
21
|
+
display 1+2
|
22
|
+
# undisplay should trigger display annotation
|
23
|
+
undisplay 1
|
24
|
+
step
|
25
|
+
# Test error annotations
|
26
|
+
up 10
|
27
|
+
frame 100
|
28
|
+
break bogus:5
|
29
|
+
quit
|
@@ -0,0 +1,137 @@
|
|
1
|
+
gcd.rb:4
|
2
|
+
def gcd(a, b)
|
3
|
+
# # ********************************************************
|
4
|
+
# # This tests annotations
|
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
|
+
# # Get into gcd
|
15
|
+
# step 2
|
16
|
+
starting
|
17
|
+
stopped
|
18
|
+
breakpoints
|
19
|
+
No breakpoints.
|
20
|
+
|
21
|
+
stack
|
22
|
+
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
23
|
+
#1 at line gcd.rb:18
|
24
|
+
|
25
|
+
variables
|
26
|
+
a = 3
|
27
|
+
b = 5
|
28
|
+
self = main
|
29
|
+
|
30
|
+
source gcd.rb:6
|
31
|
+
if a > b
|
32
|
+
# # "break" should trigger break annotation
|
33
|
+
# break 10
|
34
|
+
Breakpoint 1 file ./gcd.rb, line 10
|
35
|
+
breakpoints
|
36
|
+
Num Enb What
|
37
|
+
1 y at gcd.rb:10
|
38
|
+
|
39
|
+
# # "delete" should trigger break annotation
|
40
|
+
# delete 1
|
41
|
+
breakpoints
|
42
|
+
No breakpoints.
|
43
|
+
|
44
|
+
# # p should not trigger a breakpoint annotation
|
45
|
+
# p a
|
46
|
+
3
|
47
|
+
# # "up" should trigger annotations
|
48
|
+
# up
|
49
|
+
#1 at line gcd.rb:18
|
50
|
+
stack
|
51
|
+
#0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
52
|
+
--> #1 at line gcd.rb:18
|
53
|
+
|
54
|
+
variables
|
55
|
+
self = main
|
56
|
+
|
57
|
+
# # "b" should trigger like "break"
|
58
|
+
# b 12
|
59
|
+
Breakpoint 2 file ./gcd.rb, line 12
|
60
|
+
breakpoints
|
61
|
+
Num Enb What
|
62
|
+
2 y at gcd.rb:12
|
63
|
+
|
64
|
+
# # "display" should trigger display annotation
|
65
|
+
# display 1+2
|
66
|
+
1: 1+2 = 3
|
67
|
+
display
|
68
|
+
1: 1+2 = 3
|
69
|
+
|
70
|
+
# # undisplay should trigger display annotation
|
71
|
+
# undisplay 1
|
72
|
+
display
|
73
|
+
|
74
|
+
# step
|
75
|
+
display
|
76
|
+
|
77
|
+
starting
|
78
|
+
stopped
|
79
|
+
breakpoints
|
80
|
+
Num Enb What
|
81
|
+
2 y at gcd.rb:12
|
82
|
+
|
83
|
+
display
|
84
|
+
|
85
|
+
stack
|
86
|
+
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
87
|
+
#1 at line gcd.rb:18
|
88
|
+
|
89
|
+
variables
|
90
|
+
a = 3
|
91
|
+
b = 5
|
92
|
+
self = main
|
93
|
+
|
94
|
+
source gcd.rb:6
|
95
|
+
if a > b
|
96
|
+
# # Test error annotations
|
97
|
+
# up 10
|
98
|
+
error-begin
|
99
|
+
Adjusting would put us beyond the oldest (initial) frame.
|
100
|
+
|
101
|
+
display
|
102
|
+
|
103
|
+
stack
|
104
|
+
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
105
|
+
#1 at line gcd.rb:18
|
106
|
+
|
107
|
+
variables
|
108
|
+
a = 3
|
109
|
+
b = 5
|
110
|
+
self = main
|
111
|
+
|
112
|
+
# frame 100
|
113
|
+
error-begin
|
114
|
+
Adjusting would put us beyond the oldest (initial) frame.
|
115
|
+
|
116
|
+
display
|
117
|
+
|
118
|
+
stack
|
119
|
+
--> #0 Object.gcd(a#Fixnum, b#Fixnum) at line gcd.rb:6
|
120
|
+
#1 at line gcd.rb:18
|
121
|
+
|
122
|
+
variables
|
123
|
+
a = 3
|
124
|
+
b = 5
|
125
|
+
self = main
|
126
|
+
|
127
|
+
# break bogus:5
|
128
|
+
error-begin
|
129
|
+
No source file named bogus
|
130
|
+
|
131
|
+
breakpoints
|
132
|
+
Num Enb What
|
133
|
+
2 y at gcd.rb:12
|
134
|
+
|
135
|
+
display
|
136
|
+
|
137
|
+
# quit
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# ********************************************************
|
2
|
+
# This tests mostly invalid breakpoints.
|
3
|
+
# We have some valid ones too.
|
4
|
+
# ********************************************************
|
5
|
+
set debuggertesting on
|
6
|
+
set callstyle last
|
7
|
+
set autoeval off
|
8
|
+
# There aren't 100 lines in gcd.rb.
|
9
|
+
break 100
|
10
|
+
break gcd.rb:100
|
11
|
+
# Line one isn't a valid stopping point.
|
12
|
+
# It is a comment.
|
13
|
+
break gcd.rb:1
|
14
|
+
# This line is okay
|
15
|
+
break gcd.rb:4
|
16
|
+
# No class Foo.
|
17
|
+
break Foo.bar
|
18
|
+
quit
|