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/test-raise.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
# Test Debugger.load handles uncaught exceptions in the debugged program.
|
8
|
+
class TestRaise < Test::Unit::TestCase
|
9
|
+
|
10
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
11
|
+
defined?(@@SRC_DIR)
|
12
|
+
|
13
|
+
require File.join(@@SRC_DIR, 'helper')
|
14
|
+
include TestHelper
|
15
|
+
|
16
|
+
def test_basic
|
17
|
+
testname='raise'
|
18
|
+
Dir.chdir(@@SRC_DIR) do
|
19
|
+
script = File.join('data', testname + '.cmd')
|
20
|
+
assert_equal(true,
|
21
|
+
run_debugger(testname,
|
22
|
+
"--script #{script} -- ./raise.rb"))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/test/test-save.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# require 'rubygems'
|
5
|
+
# require 'ruby-debug'; Debugger.start(:post_mortem =>true)
|
6
|
+
|
7
|
+
class TestSave < Test::Unit::TestCase
|
8
|
+
|
9
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
10
|
+
defined?(@@SRC_DIR)
|
11
|
+
|
12
|
+
require File.join(@@SRC_DIR, 'helper')
|
13
|
+
include TestHelper
|
14
|
+
|
15
|
+
# Test initial variables and setting/getting state.
|
16
|
+
def test_basic
|
17
|
+
testname='save'
|
18
|
+
filter = Proc.new{|got_lines, correct_lines|
|
19
|
+
got_lines.each do |s|
|
20
|
+
s.sub!(/2 file .*gcd.rb/, '2 file gcd.rb')
|
21
|
+
end
|
22
|
+
}
|
23
|
+
Dir.chdir(@@SRC_DIR) do
|
24
|
+
script = File.join('data', testname + '.cmd')
|
25
|
+
assert_equal(true,
|
26
|
+
run_debugger(testname,
|
27
|
+
"--script #{script} -- ./gcd.rb 3 5",
|
28
|
+
nil, filter))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
# Test variable scope
|
8
|
+
class TestScopeVar < Test::Unit::TestCase
|
9
|
+
|
10
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
11
|
+
defined?(@@SRC_DIR)
|
12
|
+
|
13
|
+
require File.join(@@SRC_DIR, 'helper')
|
14
|
+
include TestHelper
|
15
|
+
|
16
|
+
def test_basic
|
17
|
+
testname='scope-var'
|
18
|
+
Dir.chdir(@@SRC_DIR) do
|
19
|
+
script = File.join('data', testname + '.cmd')
|
20
|
+
assert_equal(true,
|
21
|
+
run_debugger(testname,
|
22
|
+
"--script #{script} -- ./#{testname}.rb"))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
class TestSetShow < Test::Unit::TestCase
|
8
|
+
|
9
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
10
|
+
defined?(@@SRC_DIR)
|
11
|
+
|
12
|
+
require File.join(@@SRC_DIR, 'helper')
|
13
|
+
include TestHelper
|
14
|
+
|
15
|
+
# Test initial variables and setting/getting state.
|
16
|
+
def test_basic
|
17
|
+
testname='setshow'
|
18
|
+
Dir.chdir(@@SRC_DIR) do
|
19
|
+
script = File.join('data', testname + '.cmd')
|
20
|
+
assert_equal(true,
|
21
|
+
run_debugger(testname,
|
22
|
+
"--script #{script} -- ./gcd.rb 3 5"))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/test/test-source.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
# Test 'source' command handling.
|
8
|
+
class TestSource < Test::Unit::TestCase
|
9
|
+
|
10
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
11
|
+
defined?(@@SRC_DIR)
|
12
|
+
|
13
|
+
require File.join(@@SRC_DIR, 'helper')
|
14
|
+
include TestHelper
|
15
|
+
|
16
|
+
def test_basic
|
17
|
+
testname='source'
|
18
|
+
Dir.chdir(@@SRC_DIR) do
|
19
|
+
script = File.join('data', testname + '.cmd')
|
20
|
+
assert_equal(true,
|
21
|
+
run_debugger(testname,
|
22
|
+
"--script #{script} -- ./gcd.rb 3 5"))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
# Test that linetracing does something.
|
8
|
+
class TestStepping < Test::Unit::TestCase
|
9
|
+
|
10
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
11
|
+
defined?(@@SRC_DIR)
|
12
|
+
|
13
|
+
require File.join(@@SRC_DIR, 'helper')
|
14
|
+
include TestHelper
|
15
|
+
|
16
|
+
# Test commands in stepping.rb
|
17
|
+
def test_basic
|
18
|
+
testname='stepping'
|
19
|
+
Dir.chdir(@@SRC_DIR) do
|
20
|
+
script = File.join('data', testname + '.cmd')
|
21
|
+
assert_equal(true,
|
22
|
+
run_debugger(testname,
|
23
|
+
"--script #{script} -- ./gcd.rb 3 5"))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/test/test-trace.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# begin require 'rubygems' rescue LoadError end
|
5
|
+
# require 'ruby-debug'; Debugger.start
|
6
|
+
|
7
|
+
# Test tracing
|
8
|
+
class TestTrace < Test::Unit::TestCase
|
9
|
+
|
10
|
+
@@SRC_DIR = File.join(Dir.pwd, File.dirname(__FILE__)) unless
|
11
|
+
defined?(@@SRC_DIR)
|
12
|
+
|
13
|
+
require File.join(@@SRC_DIR, 'helper')
|
14
|
+
include TestHelper
|
15
|
+
|
16
|
+
def test_trace_option
|
17
|
+
|
18
|
+
filter = Proc.new{|got_lines, correct_lines|
|
19
|
+
got_lines.collect!{|l| l !~ /:gcd\.rb:/? l : nil}.compact!
|
20
|
+
}
|
21
|
+
|
22
|
+
testname='trace'
|
23
|
+
Dir.chdir(@@SRC_DIR) do
|
24
|
+
assert_equal(true,
|
25
|
+
run_debugger(testname,
|
26
|
+
"-nx --trace ./gcd.rb 3 5", nil, filter))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_linetrace_command
|
31
|
+
|
32
|
+
filter = Proc.new{|got_lines, correct_lines|
|
33
|
+
got_lines.collect!{|l| l !~ /:rdbg\.rb:/? l : nil}.compact!
|
34
|
+
}
|
35
|
+
|
36
|
+
testname='linetrace'
|
37
|
+
Dir.chdir(@@SRC_DIR) do
|
38
|
+
script = File.join('data', testname + '.cmd')
|
39
|
+
assert_equal(true,
|
40
|
+
run_debugger(testname,
|
41
|
+
"--script #{script} -- ./gcd.rb 3 5", nil,
|
42
|
+
filter))
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
data/test/thread1.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Adapted from Programming Ruby 2nd Ed. p. 138
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
unless defined?(Debugger)
|
6
|
+
puts "This program has to be called from the debugger"
|
7
|
+
exit 1
|
8
|
+
end
|
9
|
+
|
10
|
+
def fn(count, i)
|
11
|
+
sleep(rand(0.1))
|
12
|
+
if 4 == i
|
13
|
+
debugger
|
14
|
+
end
|
15
|
+
Thread.current['mycount'] = count
|
16
|
+
end
|
17
|
+
|
18
|
+
count = 0
|
19
|
+
threads = []
|
20
|
+
5.times do |i|
|
21
|
+
threads[i] = Thread.new do
|
22
|
+
fn(count, i)
|
23
|
+
count += 1
|
24
|
+
end
|
25
|
+
end
|
26
|
+
threads.each {|t| t.join }
|
data/test/trunc-call.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This program is used to test that 'restart' works when we didn't call
|
3
|
+
# the debugger initially.
|
4
|
+
|
5
|
+
TOP_SRC_DIR = File.join(File.expand_path(File.dirname(__FILE__), "..")) unless
|
6
|
+
defined?(TOP_SRC_DIR)
|
7
|
+
|
8
|
+
$:.unshift File.join(TOP_SRC_DIR, "ext")
|
9
|
+
$:.unshift File.join(TOP_SRC_DIR, "lib")
|
10
|
+
$:.unshift File.join(TOP_SRC_DIR, "cli")
|
11
|
+
require 'ruby-debug'
|
12
|
+
|
13
|
+
# GCD. We assume positive numbers
|
14
|
+
def gcd(a, b)
|
15
|
+
# Make: a <= b
|
16
|
+
if a > b
|
17
|
+
a, b = [b, a]
|
18
|
+
end
|
19
|
+
if a==3
|
20
|
+
Debugger.debugger
|
21
|
+
end
|
22
|
+
|
23
|
+
return nil if a <= 0
|
24
|
+
|
25
|
+
if a == 1 or b-a == 0
|
26
|
+
return a
|
27
|
+
end
|
28
|
+
return gcd(b-a, a)
|
29
|
+
end
|
30
|
+
|
31
|
+
gcd(13,8)
|
metadata
ADDED
@@ -0,0 +1,364 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: debugger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc1
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Kent Sibilev
|
9
|
+
- Mark Moseley
|
10
|
+
- Gabriel Horner
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2012-03-30 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: columnize
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.3.1
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 0.3.1
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: ruby_core_source
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.1.5
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.5
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: debugger-linecache
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
type: :runtime
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
description: ! 'debugger is a fast implementation of the standard Ruby debugger debug.rb.
|
65
|
+
|
66
|
+
It is implemented by utilizing a new Ruby C API hook. The core component
|
67
|
+
|
68
|
+
provides support that front-ends can build on. It provides breakpoint
|
69
|
+
|
70
|
+
handling, bindings for stack frames among other things.
|
71
|
+
|
72
|
+
'
|
73
|
+
email: gabriel.horner@gmail.com
|
74
|
+
executables: []
|
75
|
+
extensions:
|
76
|
+
- ext/ruby_debug/extconf.rb
|
77
|
+
extra_rdoc_files:
|
78
|
+
- README.md
|
79
|
+
files:
|
80
|
+
- AUTHORS
|
81
|
+
- CHANGES
|
82
|
+
- ChangeLog
|
83
|
+
- INSTALL.SVN
|
84
|
+
- LICENSE
|
85
|
+
- Makefile.am
|
86
|
+
- OLD_README
|
87
|
+
- README.md
|
88
|
+
- Rakefile
|
89
|
+
- autogen.sh
|
90
|
+
- bin/rdebug
|
91
|
+
- cli/ruby-debug.rb
|
92
|
+
- cli/ruby-debug/command.rb
|
93
|
+
- cli/ruby-debug/commands/breakpoints.rb
|
94
|
+
- cli/ruby-debug/commands/catchpoint.rb
|
95
|
+
- cli/ruby-debug/commands/condition.rb
|
96
|
+
- cli/ruby-debug/commands/continue.rb
|
97
|
+
- cli/ruby-debug/commands/control.rb
|
98
|
+
- cli/ruby-debug/commands/display.rb
|
99
|
+
- cli/ruby-debug/commands/edit.rb
|
100
|
+
- cli/ruby-debug/commands/enable.rb
|
101
|
+
- cli/ruby-debug/commands/eval.rb
|
102
|
+
- cli/ruby-debug/commands/finish.rb
|
103
|
+
- cli/ruby-debug/commands/frame.rb
|
104
|
+
- cli/ruby-debug/commands/help.rb
|
105
|
+
- cli/ruby-debug/commands/info.rb
|
106
|
+
- cli/ruby-debug/commands/irb.rb
|
107
|
+
- cli/ruby-debug/commands/jump.rb
|
108
|
+
- cli/ruby-debug/commands/kill.rb
|
109
|
+
- cli/ruby-debug/commands/list.rb
|
110
|
+
- cli/ruby-debug/commands/method.rb
|
111
|
+
- cli/ruby-debug/commands/quit.rb
|
112
|
+
- cli/ruby-debug/commands/reload.rb
|
113
|
+
- cli/ruby-debug/commands/save.rb
|
114
|
+
- cli/ruby-debug/commands/set.rb
|
115
|
+
- cli/ruby-debug/commands/show.rb
|
116
|
+
- cli/ruby-debug/commands/skip.rb
|
117
|
+
- cli/ruby-debug/commands/source.rb
|
118
|
+
- cli/ruby-debug/commands/stepping.rb
|
119
|
+
- cli/ruby-debug/commands/threads.rb
|
120
|
+
- cli/ruby-debug/commands/tmate.rb
|
121
|
+
- cli/ruby-debug/commands/trace.rb
|
122
|
+
- cli/ruby-debug/commands/variables.rb
|
123
|
+
- cli/ruby-debug/debugger.rb
|
124
|
+
- cli/ruby-debug/helper.rb
|
125
|
+
- cli/ruby-debug/interface.rb
|
126
|
+
- cli/ruby-debug/processor.rb
|
127
|
+
- configure.ac
|
128
|
+
- debugger.gemspec
|
129
|
+
- doc/.cvsignore
|
130
|
+
- doc/Makefile.am
|
131
|
+
- doc/emacs-notes.txt
|
132
|
+
- doc/hanoi.rb
|
133
|
+
- doc/primes.rb
|
134
|
+
- doc/rdebug-emacs.texi
|
135
|
+
- doc/rdebug.1
|
136
|
+
- doc/ruby-debug.texi
|
137
|
+
- doc/test-tri2.rb
|
138
|
+
- doc/tri3.rb
|
139
|
+
- doc/triangle.rb
|
140
|
+
- emacs/Makefile.am
|
141
|
+
- emacs/rdebug-annotate.el
|
142
|
+
- emacs/rdebug-breaks.el
|
143
|
+
- emacs/rdebug-cmd.el
|
144
|
+
- emacs/rdebug-core.el
|
145
|
+
- emacs/rdebug-dbg.el
|
146
|
+
- emacs/rdebug-error.el
|
147
|
+
- emacs/rdebug-fns.el
|
148
|
+
- emacs/rdebug-frames.el
|
149
|
+
- emacs/rdebug-gud.el
|
150
|
+
- emacs/rdebug-help.el
|
151
|
+
- emacs/rdebug-info.el
|
152
|
+
- emacs/rdebug-layouts.el
|
153
|
+
- emacs/rdebug-locring.el
|
154
|
+
- emacs/rdebug-output.el
|
155
|
+
- emacs/rdebug-regexp.el
|
156
|
+
- emacs/rdebug-secondary.el
|
157
|
+
- emacs/rdebug-shortkey.el
|
158
|
+
- emacs/rdebug-source.el
|
159
|
+
- emacs/rdebug-track.el
|
160
|
+
- emacs/rdebug-varbuf.el
|
161
|
+
- emacs/rdebug-vars.el
|
162
|
+
- emacs/rdebug-watch.el
|
163
|
+
- emacs/rdebug.el
|
164
|
+
- emacs/test/elk-test.el
|
165
|
+
- emacs/test/test-annotate.el
|
166
|
+
- emacs/test/test-cmd.el
|
167
|
+
- emacs/test/test-core.el
|
168
|
+
- emacs/test/test-fns.el
|
169
|
+
- emacs/test/test-frames.el
|
170
|
+
- emacs/test/test-gud.el
|
171
|
+
- emacs/test/test-indent.el
|
172
|
+
- emacs/test/test-regexp.el
|
173
|
+
- emacs/test/test-shortkey.el
|
174
|
+
- ext/ruby_debug/breakpoint.c
|
175
|
+
- ext/ruby_debug/extconf.rb
|
176
|
+
- ext/ruby_debug/ruby_debug.c
|
177
|
+
- ext/ruby_debug/ruby_debug.h
|
178
|
+
- lib/ChangeLog
|
179
|
+
- lib/debugger.rb
|
180
|
+
- lib/debugger/version.rb
|
181
|
+
- lib/ruby-debug-base.rb
|
182
|
+
- rdbg.rb
|
183
|
+
- runner.sh
|
184
|
+
- svn2cl_usermap
|
185
|
+
- test/.cvsignore
|
186
|
+
- test/base/base.rb
|
187
|
+
- test/base/binding.rb
|
188
|
+
- test/base/catchpoint.rb
|
189
|
+
- test/base/load.rb
|
190
|
+
- test/bp_loop_issue.rb
|
191
|
+
- test/classes.rb
|
192
|
+
- test/cli/commands/catchpoint_test.rb
|
193
|
+
- test/cli/commands/unit/regexp.rb
|
194
|
+
- test/config.yaml
|
195
|
+
- test/data/annotate.cmd
|
196
|
+
- test/data/annotate.right
|
197
|
+
- test/data/break_bad.cmd
|
198
|
+
- test/data/break_bad.right
|
199
|
+
- test/data/break_loop_bug.cmd
|
200
|
+
- test/data/break_loop_bug.right
|
201
|
+
- test/data/breakpoints.cmd
|
202
|
+
- test/data/breakpoints.right
|
203
|
+
- test/data/catch.cmd
|
204
|
+
- test/data/catch.right
|
205
|
+
- test/data/catch2.cmd
|
206
|
+
- test/data/catch2.right
|
207
|
+
- test/data/catch3.cmd
|
208
|
+
- test/data/catch3.right
|
209
|
+
- test/data/condition.cmd
|
210
|
+
- test/data/condition.right
|
211
|
+
- test/data/ctrl.cmd
|
212
|
+
- test/data/ctrl.right
|
213
|
+
- test/data/display.cmd
|
214
|
+
- test/data/display.right
|
215
|
+
- test/data/dollar-0.right
|
216
|
+
- test/data/dollar-0a.right
|
217
|
+
- test/data/dollar-0b.right
|
218
|
+
- test/data/edit.cmd
|
219
|
+
- test/data/edit.right
|
220
|
+
- test/data/emacs_basic.cmd
|
221
|
+
- test/data/emacs_basic.right
|
222
|
+
- test/data/enable.cmd
|
223
|
+
- test/data/enable.right
|
224
|
+
- test/data/finish.cmd
|
225
|
+
- test/data/finish.right
|
226
|
+
- test/data/frame.cmd
|
227
|
+
- test/data/frame.right
|
228
|
+
- test/data/help.cmd
|
229
|
+
- test/data/help.right
|
230
|
+
- test/data/history.right
|
231
|
+
- test/data/info-thread.cmd
|
232
|
+
- test/data/info-thread.right
|
233
|
+
- test/data/info-var-bug2.cmd
|
234
|
+
- test/data/info-var-bug2.right
|
235
|
+
- test/data/info-var.cmd
|
236
|
+
- test/data/info-var.right
|
237
|
+
- test/data/info.cmd
|
238
|
+
- test/data/info.right
|
239
|
+
- test/data/jump.cmd
|
240
|
+
- test/data/jump.right
|
241
|
+
- test/data/jump2.cmd
|
242
|
+
- test/data/jump2.right
|
243
|
+
- test/data/linetrace.cmd
|
244
|
+
- test/data/linetrace.right
|
245
|
+
- test/data/list.cmd
|
246
|
+
- test/data/list.right
|
247
|
+
- test/data/method.cmd
|
248
|
+
- test/data/method.right
|
249
|
+
- test/data/methodsig.cmd
|
250
|
+
- test/data/methodsig.right
|
251
|
+
- test/data/next.cmd
|
252
|
+
- test/data/next.right
|
253
|
+
- test/data/noquit.right
|
254
|
+
- test/data/output.cmd
|
255
|
+
- test/data/output.right
|
256
|
+
- test/data/pm-bug.cmd
|
257
|
+
- test/data/pm-bug.right
|
258
|
+
- test/data/post-mortem-next.cmd
|
259
|
+
- test/data/post-mortem-next.right
|
260
|
+
- test/data/post-mortem-osx.right
|
261
|
+
- test/data/post-mortem.cmd
|
262
|
+
- test/data/post-mortem.right
|
263
|
+
- test/data/quit.cmd
|
264
|
+
- test/data/quit.right
|
265
|
+
- test/data/raise.cmd
|
266
|
+
- test/data/raise.right
|
267
|
+
- test/data/save.cmd
|
268
|
+
- test/data/save.right
|
269
|
+
- test/data/scope-var.cmd
|
270
|
+
- test/data/scope-var.right
|
271
|
+
- test/data/setshow.cmd
|
272
|
+
- test/data/setshow.right
|
273
|
+
- test/data/source.cmd
|
274
|
+
- test/data/source.right
|
275
|
+
- test/data/stepping.cmd
|
276
|
+
- test/data/stepping.right
|
277
|
+
- test/data/test-init-cygwin.right
|
278
|
+
- test/data/test-init-osx.right
|
279
|
+
- test/data/test-init.right
|
280
|
+
- test/data/trace.right
|
281
|
+
- test/dollar-0.rb
|
282
|
+
- test/gcd-dbg-nox.rb
|
283
|
+
- test/gcd-dbg.rb
|
284
|
+
- test/gcd.rb
|
285
|
+
- test/helper.rb
|
286
|
+
- test/info-var-bug.rb
|
287
|
+
- test/info-var-bug2.rb
|
288
|
+
- test/jump.rb
|
289
|
+
- test/jump2.rb
|
290
|
+
- test/next.rb
|
291
|
+
- test/null.rb
|
292
|
+
- test/output.rb
|
293
|
+
- test/pm-base.rb
|
294
|
+
- test/pm-bug.rb
|
295
|
+
- test/pm-catch.rb
|
296
|
+
- test/pm-catch2.rb
|
297
|
+
- test/pm-catch3.rb
|
298
|
+
- test/pm.rb
|
299
|
+
- test/raise.rb
|
300
|
+
- test/rdebug-save.1
|
301
|
+
- test/runall
|
302
|
+
- test/scope-var.rb
|
303
|
+
- test/tdebug.rb
|
304
|
+
- test/test-annotate.rb
|
305
|
+
- test/test-break-bad.rb
|
306
|
+
- test/test-breakpoints.rb
|
307
|
+
- test/test-catch.rb
|
308
|
+
- test/test-catch2.rb
|
309
|
+
- test/test-catch3.rb
|
310
|
+
- test/test-condition.rb
|
311
|
+
- test/test-ctrl.rb
|
312
|
+
- test/test-display.rb
|
313
|
+
- test/test-dollar-0.rb
|
314
|
+
- test/test-edit.rb
|
315
|
+
- test/test-emacs-basic.rb
|
316
|
+
- test/test-enable.rb
|
317
|
+
- test/test-finish.rb
|
318
|
+
- test/test-frame.rb
|
319
|
+
- test/test-help.rb
|
320
|
+
- test/test-hist.rb
|
321
|
+
- test/test-info-thread.rb
|
322
|
+
- test/test-info-var.rb
|
323
|
+
- test/test-info.rb
|
324
|
+
- test/test-init.rb
|
325
|
+
- test/test-jump.rb
|
326
|
+
- test/test-list.rb
|
327
|
+
- test/test-method.rb
|
328
|
+
- test/test-next.rb
|
329
|
+
- test/test-output.rb
|
330
|
+
- test/test-quit.rb
|
331
|
+
- test/test-raise.rb
|
332
|
+
- test/test-save.rb
|
333
|
+
- test/test-scope-var.rb
|
334
|
+
- test/test-setshow.rb
|
335
|
+
- test/test-source.rb
|
336
|
+
- test/test-stepping.rb
|
337
|
+
- test/test-trace.rb
|
338
|
+
- test/thread1.rb
|
339
|
+
- test/trunc-call.rb
|
340
|
+
homepage: http://github.com/cldwalker/debugger
|
341
|
+
licenses: []
|
342
|
+
post_install_message:
|
343
|
+
rdoc_options: []
|
344
|
+
require_paths:
|
345
|
+
- lib
|
346
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
347
|
+
none: false
|
348
|
+
requirements:
|
349
|
+
- - ! '>='
|
350
|
+
- !ruby/object:Gem::Version
|
351
|
+
version: '0'
|
352
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
353
|
+
none: false
|
354
|
+
requirements:
|
355
|
+
- - ! '>='
|
356
|
+
- !ruby/object:Gem::Version
|
357
|
+
version: 1.3.6
|
358
|
+
requirements: []
|
359
|
+
rubyforge_project:
|
360
|
+
rubygems_version: 1.8.19
|
361
|
+
signing_key:
|
362
|
+
specification_version: 3
|
363
|
+
summary: Fast Ruby debugger - base + cli
|
364
|
+
test_files: []
|