trepanning 1.93.35 → 2.15.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog +491 -55
- data/LICENSE +1 -1
- data/NEWS +18 -14
- data/README.md +5 -22
- data/Rakefile +22 -1
- data/app/breakpoint.rb +5 -3
- data/app/core.rb +147 -179
- data/app/default.rb +47 -46
- data/app/file.rb +6 -7
- data/app/frame.rb +183 -176
- data/app/markdown.rb +2 -9
- data/app/options.rb +1 -1
- data/app/run.rb +71 -37
- data/interface/script.rb +8 -8
- data/io.rb +19 -20
- data/lib/trepanning.rb +292 -297
- data/processor.rb +332 -344
- data/processor/breakpoint.rb +98 -96
- data/processor/command/base/submgr.rb +9 -9
- data/processor/command/break.rb +40 -38
- data/processor/command/continue.rb +15 -10
- data/processor/command/debug.rb +6 -25
- data/processor/command/delete.rb +21 -12
- data/processor/command/directory.rb +15 -13
- data/processor/command/disable.rb +12 -9
- data/processor/command/disassemble.rb +80 -74
- data/processor/command/display.rb +15 -12
- data/processor/command/down.rb +8 -3
- data/processor/command/edit.rb +37 -23
- data/processor/command/enable.rb +11 -8
- data/processor/command/eval.rb +24 -22
- data/processor/command/finish.rb +50 -48
- data/processor/command/help.rb +1 -1
- data/processor/command/info_subcmd/breakpoints.rb +7 -7
- data/processor/command/info_subcmd/files.rb +195 -196
- data/processor/command/info_subcmd/frame.rb +7 -4
- data/processor/command/info_subcmd/locals.rb +29 -12
- data/processor/command/info_subcmd/program.rb +48 -39
- data/processor/command/info_subcmd/registers_subcmd/ep.rb +46 -0
- data/processor/command/info_subcmd/registers_subcmd/helper.rb +32 -35
- data/processor/command/info_subcmd/registers_subcmd/sp.rb +29 -23
- data/processor/command/info_subcmd/return.rb +28 -10
- data/processor/command/info_subcmd/variables_subcmd/class.rb +3 -3
- data/processor/command/info_subcmd/variables_subcmd/constants.rb +77 -0
- data/processor/command/info_subcmd/variables_subcmd/globals.rb +7 -7
- data/processor/command/info_subcmd/variables_subcmd/instance.rb +68 -22
- data/processor/command/info_subcmd/variables_subcmd/locals.rb +148 -67
- data/processor/command/list.rb +14 -8
- data/processor/command/macro.rb +1 -1
- data/processor/command/next.rb +1 -0
- data/processor/command/set_subcmd/auto.rb +3 -3
- data/processor/command/set_subcmd/different.rb +30 -29
- data/processor/command/set_subcmd/events.rb +74 -48
- data/processor/command/set_subcmd/max_subcmd/list.rb +12 -5
- data/processor/command/set_subcmd/max_subcmd/width.rb +28 -19
- data/processor/command/set_subcmd/register.rb +37 -0
- data/processor/command/set_subcmd/register_subcmd/pc.rb +67 -0
- data/processor/command/set_subcmd/register_subcmd/sp.rb +75 -0
- data/processor/command/set_subcmd/reload.rb +12 -10
- data/processor/command/set_subcmd/return.rb +68 -44
- data/processor/command/shell.rb +3 -2
- data/processor/command/show_subcmd/different.rb +17 -14
- data/processor/command/show_subcmd/events.rb +25 -25
- data/processor/default.rb +1 -1
- data/processor/eval.rb +14 -15
- data/processor/frame.rb +43 -36
- data/processor/help.rb +5 -5
- data/processor/hook.rb +26 -29
- data/processor/location.rb +54 -51
- data/processor/mock.rb +4 -3
- data/processor/running.rb +113 -103
- data/processor/validate.rb +401 -373
- data/test/data/debug.cmd +8 -0
- data/test/data/debug.right +13 -0
- data/test/data/debugger-stop.right +6 -4
- data/test/data/fname-with-blank.cmd +1 -1
- data/test/data/fname-with-blank.right +5 -0
- data/test/data/pc.cmd +8 -0
- data/test/data/pc.right +10 -0
- data/test/data/quit.right +3 -1
- data/test/data/trace.cmd +2 -2
- data/test/data/trace.right +41 -20
- data/test/example/assign.rb +6 -0
- data/test/functional/fn_helper.rb +11 -17
- data/test/functional/test-break-long.rb +15 -16
- data/test/functional/test-break.rb +6 -8
- data/test/functional/test-condition.rb +8 -10
- data/test/functional/test-debugger-call-bug.rb +21 -22
- data/test/functional/test-delete.rb +57 -59
- data/test/functional/test-eval.rb +101 -103
- data/test/functional/test-finish.rb +24 -33
- data/test/functional/test-immediate-step-bug.rb +6 -10
- data/test/functional/test-next.rb +64 -65
- data/test/functional/test-raise.rb +63 -64
- data/test/functional/test-recursive-bt.rb +81 -76
- data/test/functional/test-remap.rb +6 -7
- data/test/functional/test-return.rb +44 -38
- data/test/functional/test-step.rb +55 -53
- data/test/functional/test-stepbug.rb +6 -9
- data/test/functional/test-watchg.rb +40 -39
- data/test/integration/test-debug.rb +12 -0
- data/test/integration/test-debugger-stop.rb +7 -7
- data/test/integration/test-pc.rb +24 -0
- data/test/integration/test-trace.rb +1 -1
- data/test/unit/cmd-helper.rb +0 -1
- data/test/unit/test-app-brkpt.rb +21 -21
- data/test/unit/test-app-brkptmgr.rb +7 -8
- data/test/unit/test-app-display.rb +3 -4
- data/test/unit/test-app-frame.rb +4 -5
- data/test/unit/test-base-subsubcmd.rb +2 -2
- data/test/unit/test-cmd-break.rb +6 -6
- data/test/unit/test-cmd-endisable.rb +7 -6
- data/test/unit/test-cmd-parse_list_cmd.rb +24 -24
- data/test/unit/test-io-tcpserver.rb +39 -35
- data/test/unit/test-proc-default.rb +23 -22
- data/test/unit/test-proc-eval.rb +1 -2
- data/test/unit/test-proc-frame.rb +8 -9
- data/test/unit/test-proc-list.rb +1 -1
- data/test/unit/test-proc-location.rb +2 -2
- data/test/unit/test-proc-main.rb +10 -10
- data/test/unit/test-proc-validate.rb +11 -13
- data/test/unit/test-subcmd-help.rb +1 -2
- data/trepanning.gemspec +8 -13
- metadata +44 -95
- data/COPYING +0 -57
- data/data/custom_require.rb +0 -44
- data/data/perldb.bindings +0 -17
- data/data/prelude.rb +0 -38
- data/processor/command/info_subcmd/variables_subcmd/constant.rb +0 -41
- data/processor/command/raise.rb +0 -48
- data/processor/command/set_subcmd/pc.rb +0 -62
- data/processor/command/set_subcmd/sp.rb +0 -67
- data/processor/eventbuf.rb +0 -133
@@ -3,31 +3,31 @@ require_relative 'cmd-helper'
|
|
3
3
|
require_relative '../../processor/command/list'
|
4
4
|
|
5
5
|
class TestCommandParseListCmd < Test::Unit::TestCase
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
def test_parse_list_cmd
|
12
|
-
tf = RubyVM::Frame.current
|
13
|
-
@cmdproc.frame_setup(tf)
|
14
|
-
short_file = File.basename(__FILE__)
|
15
|
-
listsize = 10
|
16
|
-
line = __LINE__ - 8
|
17
|
-
load 'tmpdir.rb'
|
18
|
-
[['', [short_file, line, line+listsize-1]],
|
19
|
-
["#{__FILE__}:10", [short_file, 5, 14]],
|
20
|
-
["#{__FILE__} 10", [short_file, 5, 14]],
|
21
|
-
['tmpdir.rb', ['tmpdir.rb', 1, listsize]],
|
22
|
-
['tmpdir.rb 10', ['tmpdir.rb', 5, 5+listsize-1]],
|
23
|
-
# ['Columnize.columnize 15', ['columnize.rb', 10, 10+listsize -1]],
|
24
|
-
# ['Columnize.columnize 30 3', ['columnize.rb', 30, 32]],
|
25
|
-
# ['Columnize.columnize 40 50', ['columnize.rb', 40, 50]],
|
26
|
-
].each do |arg_str, expect|
|
27
|
-
got = @cmdproc.parse_list_cmd(arg_str, listsize, listsize/2)[1..-1]
|
28
|
-
got[0] = File.basename(got[0])
|
29
|
-
assert_equal expect, got
|
6
|
+
include UnitHelper
|
7
|
+
def setup
|
8
|
+
common_setup
|
9
|
+
@cmd = @cmds['list']
|
30
10
|
end
|
11
|
+
def test_parse_list_cmd
|
12
|
+
tf = RubyVM::Frame.get
|
13
|
+
@cmdproc.frame_setup(tf)
|
14
|
+
short_file = File.basename(__FILE__)
|
15
|
+
listsize = 10
|
16
|
+
line = __LINE__+5
|
17
|
+
load 'tmpdir.rb'
|
18
|
+
[['', [short_file, line, line+listsize-1]],
|
19
|
+
["#{__FILE__}:10", [short_file, 5, 14]],
|
20
|
+
["#{__FILE__} 10", [short_file, 5, 14]],
|
21
|
+
['tmpdir.rb', ['tmpdir.rb', 1, listsize]],
|
22
|
+
['tmpdir.rb 10', ['tmpdir.rb', 5, 5+listsize-1]],
|
23
|
+
['Columnize.columnize 15', ['columnize.rb', 10, 10+listsize -1]],
|
24
|
+
['Columnize.columnize 30 3', ['columnize.rb', 30, 32]],
|
25
|
+
['Columnize.columnize 40 50', ['columnize.rb', 40, 50]],
|
26
|
+
].each do |arg_str, expect|
|
27
|
+
got = @cmdproc.parse_list_cmd(arg_str, listsize, listsize/2)[1..-1]
|
28
|
+
got[0] = File.basename(got[0])
|
29
|
+
assert_equal expect, got
|
30
|
+
end
|
31
31
|
end
|
32
32
|
|
33
33
|
end
|
@@ -7,43 +7,47 @@ require_relative '../../io/tcpserver'
|
|
7
7
|
|
8
8
|
class TestTCPDbgServer < Test::Unit::TestCase
|
9
9
|
|
10
|
-
|
10
|
+
include Trepanning::TCPPacking
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
12
|
+
def test_basic
|
13
|
+
server = Trepan::TCPDbgServer.new({ :open => false,
|
14
|
+
:port => 1027,
|
15
|
+
:host => 'localhost'
|
16
|
+
})
|
17
|
+
server.open
|
18
|
+
threads = []
|
19
|
+
msgs = %w(one two three)
|
20
|
+
Thread.new do
|
21
|
+
msgs.each do |msg|
|
22
|
+
begin
|
23
|
+
line = server.read_msg.chomp
|
24
|
+
assert_equal(msg, line)
|
25
|
+
rescue EOFError
|
26
|
+
puts 'Got EOF'
|
27
|
+
break
|
28
|
+
end
|
29
|
+
end
|
28
30
|
end
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
threads << Thread.new do
|
32
|
+
begin
|
33
|
+
t = TCPSocket.new('localhost', 1027)
|
34
|
+
msgs.each do |msg|
|
35
|
+
begin
|
36
|
+
t.puts(pack_msg(msg))
|
37
|
+
rescue EOFError
|
38
|
+
puts "Got EOF"
|
39
|
+
break
|
40
|
+
rescue Exception => e
|
41
|
+
puts "Got #{e}"
|
42
|
+
break
|
43
|
+
end
|
44
|
+
end
|
45
|
+
t.close
|
46
|
+
rescue Errno::ECONNREFUSED
|
47
|
+
skip "Can't open client port 1027"
|
48
|
+
end
|
42
49
|
end
|
43
|
-
|
44
|
-
|
50
|
+
threads.each {|t| t.join }
|
51
|
+
server.close
|
45
52
|
end
|
46
|
-
threads.each {|t| t.join }
|
47
|
-
server.close
|
48
|
-
end
|
49
53
|
end
|
@@ -4,31 +4,32 @@ require 'test/unit'
|
|
4
4
|
# Test Trepan::CmdProcessor::Default
|
5
5
|
class TestProcDefault < Test::Unit::TestCase
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
DIR = File.dirname(__FILE__)
|
8
|
+
DEFAULT_RBFILE = File.join(%W(#{DIR} .. .. processor default.rb))
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
def test_maxwidth_setting
|
11
|
+
ENV['COLUMNS'] = '50'
|
12
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS') if
|
13
|
+
(defined?(TestProcDefault::Trepan) &&
|
14
|
+
Trepan::CmdProcessor.const_defined?('DEFAULT_SETTINGS'))
|
15
|
+
load DEFAULT_RBFILE
|
16
|
+
assert_equal(50, Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
17
|
+
'Pick up COLUMNS environment')
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS')
|
20
|
+
load DEFAULT_RBFILE
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
ENV['COLUMNS'] = '0'
|
23
|
+
assert_operator(Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
24
|
+
:>=, 10,
|
25
|
+
'Change too small COLUMNS environment value')
|
25
26
|
|
26
|
-
|
27
|
-
|
27
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS')
|
28
|
+
load DEFAULT_RBFILE
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
ENV['COLUMNS'] = 'non-numeric-string'
|
31
|
+
assert_operator(Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
32
|
+
:>=, 10,
|
33
|
+
'Change too small COLUMNS environment value')
|
34
|
+
end
|
34
35
|
end
|
data/test/unit/test-proc-eval.rb
CHANGED
@@ -14,8 +14,7 @@ class TestProcEval < Test::Unit::TestCase
|
|
14
14
|
assert_equal('(eval "x = 1;"...)',
|
15
15
|
cmdp.fake_eval_filename('x = 1; y = 2', 7))
|
16
16
|
x = 1
|
17
|
-
|
18
|
-
cmdp.instance_variable_set('@frame', RubyVM::Frame.current)
|
17
|
+
cmdp.instance_variable_set('@frame', RubyVM::Frame.get)
|
19
18
|
cmdp.instance_variable_set('@settings', {:stack_trace_on_error => true})
|
20
19
|
assert_equal('1', cmdp.debug_eval('x = "#{x}"'))
|
21
20
|
x = 2
|
@@ -1,6 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'test/unit'
|
3
|
-
require 'thread_frame'
|
4
3
|
require_relative '../../processor'
|
5
4
|
require_relative '../../processor/frame'
|
6
5
|
require_relative '../../app/mock'
|
@@ -34,11 +33,11 @@ class TestCmdProcessorFrame < Test::Unit::TestCase
|
|
34
33
|
|
35
34
|
# See that we have can load up commands
|
36
35
|
def test_basic
|
37
|
-
@proc.frame_setup(RubyVM::Frame.
|
36
|
+
@proc.frame_setup(RubyVM::Frame.get)
|
38
37
|
|
39
38
|
# Test absolute positioning. Should all be okay
|
40
|
-
0.upto(@proc.top_frame.stack_size-1) do |i|
|
41
|
-
@proc.adjust_frame(i, true)
|
39
|
+
0.upto(@proc.top_frame.stack_size-1) do |i|
|
40
|
+
@proc.adjust_frame(i, true)
|
42
41
|
assert_equal(0, $errors.size)
|
43
42
|
assert_equal(true, $msgs.size >= i+1)
|
44
43
|
end
|
@@ -53,19 +52,19 @@ class TestCmdProcessorFrame < Test::Unit::TestCase
|
|
53
52
|
assert_equal(frame_index, @proc.frame_index)
|
54
53
|
|
55
54
|
setup
|
56
|
-
@proc.top_frame = @proc.frame = RubyVM::Frame.
|
55
|
+
@proc.top_frame = @proc.frame = RubyVM::Frame.get
|
57
56
|
@proc.adjust_frame(0, true)
|
58
57
|
|
59
|
-
@proc.top_frame.stack_size-1.times do
|
58
|
+
@proc.top_frame.stack_size-1.times do
|
60
59
|
frame_index = @proc.frame_index
|
61
|
-
@proc.adjust_frame(1, false)
|
60
|
+
@proc.adjust_frame(1, false)
|
62
61
|
assert_equal(0, $errors.size)
|
63
62
|
assert_not_equal(frame_index, @proc.frame_index,
|
64
63
|
'@proc.frame_index should have moved')
|
65
64
|
end
|
66
|
-
# FIXME: bug in threadframe top_frame.stack_size?
|
65
|
+
# FIXME: bug in threadframe top_frame.stack_size?
|
67
66
|
# # Adjust relative beyond the end
|
68
|
-
# @proc.adjust_frame(1, false)
|
67
|
+
# @proc.adjust_frame(1, false)
|
69
68
|
# assert_equal(1, $errors.size)
|
70
69
|
|
71
70
|
# Should have stayed at the end
|
data/test/unit/test-proc-list.rb
CHANGED
@@ -18,11 +18,11 @@ class TestCmdProcessorLocation < Test::Unit::TestCase
|
|
18
18
|
assert_equal File.basename(__FILE__), @cmdproc.canonic_file(__FILE__)
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def test_eval_get_source_text
|
22
22
|
assert_equal File.basename(__FILE__), @cmdproc.canonic_file(__FILE__)
|
23
23
|
eval <<-EOE
|
24
24
|
@cmdproc.frame_initialize
|
25
|
-
@cmdproc.frame_setup(RubyVM::Frame.
|
25
|
+
@cmdproc.frame_setup(RubyVM::Frame.get)
|
26
26
|
assert @cmdproc.current_source_text
|
27
27
|
EOE
|
28
28
|
end
|
data/test/unit/test-proc-main.rb
CHANGED
@@ -20,14 +20,14 @@ class TestCmdProcessor < Test::Unit::TestCase
|
|
20
20
|
assert @cmds.keys.size > 0, 'Should have found at least one command'
|
21
21
|
cmd_name, cmd_obj = @cmds.first
|
22
22
|
assert cmd_name.is_a?(String), 'Should have string name for a command'
|
23
|
-
assert(cmd_obj.kind_of?(Trepan::Command),
|
23
|
+
assert(cmd_obj.kind_of?(Trepan::Command),
|
24
24
|
'Command should be a Trapan::Command')
|
25
25
|
assert cmd_obj.respond_to?(:run), 'Command should have a run method'
|
26
26
|
end
|
27
27
|
|
28
28
|
def test_compute_prompt
|
29
29
|
assert_equal('(trepan): ', @cmdproc.compute_prompt)
|
30
|
-
Thread.new{ assert_equal('(trepan@55): ', @cmdproc.compute_prompt.gsub(
|
30
|
+
Thread.new{ assert_equal('(trepan@55): ', @cmdproc.compute_prompt.gsub(/@[-]?\d+/, '@55'))}.join
|
31
31
|
x = Thread.new{ Thread.pass; x = 1 }
|
32
32
|
assert_equal('(trepan@main): ', @cmdproc.compute_prompt)
|
33
33
|
x.join
|
@@ -59,7 +59,7 @@ class TestCmdProcessor < Test::Unit::TestCase
|
|
59
59
|
assert(ary.is_a?(Array),
|
60
60
|
"#{const} in command #{cmd_name} should be an Array")
|
61
61
|
|
62
|
-
ary.each do |v|
|
62
|
+
ary.each do |v|
|
63
63
|
assert(v.is_a?(String),
|
64
64
|
"#{const} in command #{cmd_name} should be Array of Strings; got #{v}.")
|
65
65
|
end
|
@@ -71,9 +71,9 @@ class TestCmdProcessor < Test::Unit::TestCase
|
|
71
71
|
def run_and_check(cmd, expect_msgs, expect_errmsgs, add_msg)
|
72
72
|
$errs = []; $msgs = []
|
73
73
|
@cmdproc.run_command(cmd)
|
74
|
-
assert_equal(expect_msgs, $msgs,
|
74
|
+
assert_equal(expect_msgs, $msgs,
|
75
75
|
"#{add_msg}: mismatched messages from #{caller[0]}")
|
76
|
-
assert_equal(expect_errmsgs, $errs,
|
76
|
+
assert_equal(expect_errmsgs, $errs,
|
77
77
|
"Mismatched error messages from #{caller[0]}")
|
78
78
|
end
|
79
79
|
def @cmdproc.msg(mess, opts={})
|
@@ -84,13 +84,13 @@ class TestCmdProcessor < Test::Unit::TestCase
|
|
84
84
|
end
|
85
85
|
run_and_check('!s=1', ['D=> 1'], [], "! evaluation")
|
86
86
|
run_and_check('pr "foo"', ['"foo"'], [], "print command")
|
87
|
-
run_and_check('set autoeval off',
|
88
|
-
['Evaluation of unrecognized debugger commands is off.'], [],
|
87
|
+
run_and_check('set autoeval off',
|
88
|
+
['Evaluation of unrecognized debugger commands is off.'], [],
|
89
89
|
"autoeval set")
|
90
|
-
run_and_check('asdf', [],
|
91
|
-
['Undefined command: "asdf". Try "help".'],
|
90
|
+
run_and_check('asdf', [],
|
91
|
+
['Undefined command: "asdf". Try "help".'],
|
92
92
|
"invalid command")
|
93
|
-
|
93
|
+
|
94
94
|
end
|
95
95
|
|
96
96
|
end
|
@@ -3,7 +3,6 @@ require 'test/unit'
|
|
3
3
|
require_relative '../../processor'
|
4
4
|
require_relative '../../processor/validate'
|
5
5
|
require_relative '../../app/mock'
|
6
|
-
require 'thread_frame'
|
7
6
|
|
8
7
|
$errors = []
|
9
8
|
$msgs = []
|
@@ -29,22 +28,21 @@ class TestValidate < Test::Unit::TestCase
|
|
29
28
|
end
|
30
29
|
|
31
30
|
def test_get_int
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
[['1', 1], ['1X', nil], ['bad', nil], ['1+1', 2], ['-5', -5]].each do
|
32
|
+
|arg, expected|
|
33
|
+
assert_equal(expected, @cmdproc.get_int_noerr(arg))
|
34
|
+
end
|
36
35
|
end
|
37
36
|
|
38
37
|
def test_get_on_off
|
39
|
-
onoff =
|
40
|
-
[['
|
41
|
-
['0', false], ['off', false]].each do |arg, expected|
|
38
|
+
onoff =
|
39
|
+
[['on', true], ['off', false]].each do |arg, expected|
|
42
40
|
assert_equal(expected, @cmdproc.get_onoff(arg))
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
46
44
|
def test_parse_position
|
47
|
-
tf = RubyVM::Frame.
|
45
|
+
tf = RubyVM::Frame.get
|
48
46
|
@cmdproc.frame_setup(tf)
|
49
47
|
file = File.basename(__FILE__)
|
50
48
|
[[__FILE__, [true, file, nil, nil]],
|
@@ -71,7 +69,7 @@ class TestValidate < Test::Unit::TestCase
|
|
71
69
|
end
|
72
70
|
|
73
71
|
# def test_breakpoint_position
|
74
|
-
# tf = RubyVM::Frame.
|
72
|
+
# tf = RubyVM::Frame.get
|
75
73
|
# @cmdproc.frame_setup(tf)
|
76
74
|
|
77
75
|
# def munge(args)
|
@@ -81,7 +79,7 @@ class TestValidate < Test::Unit::TestCase
|
|
81
79
|
|
82
80
|
# assert_equal([0, 'bogus', true, 'true', nil],
|
83
81
|
# munge(@cmdproc.breakpoint_position(%w(@0))))
|
84
|
-
# assert_equal([1, 'bogus', false, 'true', nil],
|
82
|
+
# assert_equal([1, 'bogus', false, 'true', nil],
|
85
83
|
# munge(@cmdproc.breakpoint_position(%w(1))))
|
86
84
|
# assert_equal([2, 'bogus', false, 'a > b', nil],
|
87
85
|
# munge(@cmdproc.breakpoint_position(%w(2 if a > b))))
|
@@ -97,10 +95,10 @@ class TestValidate < Test::Unit::TestCase
|
|
97
95
|
def test_method?
|
98
96
|
def foo; 5 end
|
99
97
|
require 'irb'
|
100
|
-
tf = RubyVM::Frame.
|
98
|
+
tf = RubyVM::Frame.get
|
101
99
|
@cmdproc.frame_setup(tf)
|
102
100
|
@cmdproc.method?('@cmdproc.errmsg')
|
103
|
-
%w(Array.map @cmdproc.errmsg foo Trepan::CmdProcessor.new IRB.start
|
101
|
+
%w(Array.map @cmdproc.errmsg foo Trepan::CmdProcessor.new IRB.start
|
104
102
|
).each do |str|
|
105
103
|
assert @cmdproc.method?(str), "#{str} should be known as a method"
|
106
104
|
end
|
data/trepanning.gemspec
CHANGED
@@ -10,22 +10,17 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['R. Bernstein']
|
11
11
|
spec.date = Time.now
|
12
12
|
spec.description = <<-EOF
|
13
|
-
|
14
|
-
|
15
|
-
A gdb-like Ruby debugger with both high and low-level debugging support.
|
16
|
-
|
17
|
-
See https://github.com/rocky/rb-trepanning/wiki/Features for a list of features.
|
13
|
+
A Ruby debugger with both high and low-level debugging support.
|
18
14
|
|
19
15
|
To provide the advanced features this version works only with a
|
20
|
-
|
16
|
+
patched MRI Ruby 2.1.5 runtime.
|
21
17
|
|
22
|
-
This version works only with a patched version of Ruby 1.
|
23
|
-
|
18
|
+
This version works only with a patched version of Ruby 2.1.5
|
19
|
+
For a version that works with Ruby 1.9.3 look install a version
|
20
|
+
starting with 1.93.
|
24
21
|
EOF
|
25
|
-
spec.add_dependency('rb-trace', '~> 0.5')
|
26
|
-
spec.add_dependency('rb-threadframe', '~> 0.41')
|
27
|
-
spec.add_dependency('columnize', '~> 0.9')
|
28
22
|
spec.add_dependency('redcarpet', '~> 3.2')
|
23
|
+
spec.add_dependency('columnize', '~> 0.9')
|
29
24
|
spec.add_dependency('coderay', '~> 1.1')
|
30
25
|
spec.add_dependency('term-ansicolor', '~> 1.3')
|
31
26
|
spec.add_development_dependency('diff-lcs', '~> 0') # For testing only
|
@@ -39,9 +34,9 @@ EOF
|
|
39
34
|
spec.name = 'trepanning'
|
40
35
|
spec.license = 'MIT'
|
41
36
|
spec.platform = Gem::Platform::RUBY
|
42
|
-
spec.required_ruby_version = '~> 1.
|
37
|
+
spec.required_ruby_version = '~> 2.1.5'
|
43
38
|
spec.require_path = 'lib'
|
44
|
-
spec.summary = 'Enhanced Ruby 1
|
39
|
+
spec.summary = 'Enhanced Ruby 2.1 Debugger'
|
45
40
|
spec.version = Trepan::VERSION
|
46
41
|
|
47
42
|
# Make the readme file the start page for the generated html
|