trepanning 0.1.6 → 1.93.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +57 -0
- data/ChangeLog +585 -736
- data/NEWS +26 -12
- data/README.md +62 -0
- data/Rakefile +15 -9
- data/app/breakpoint.rb +11 -12
- data/app/complete.rb +14 -14
- data/app/core.rb +34 -30
- data/app/default.rb +8 -7
- data/app/markdown.rb +191 -0
- data/app/options.rb +104 -99
- data/app/run.rb +9 -1
- data/app/util.rb +7 -7
- data/bin/trepan +7 -7
- data/interface.rb +0 -4
- data/interface/user.rb +11 -11
- data/io/input.rb +13 -13
- data/lib/trepanning.rb +30 -29
- data/processor.rb +40 -40
- data/processor/command.rb +13 -9
- data/processor/command/alias.rb +21 -15
- data/processor/command/backtrace.rb +27 -19
- data/processor/command/break.rb +24 -21
- data/processor/command/complete.rb +5 -2
- data/processor/command/condition.rb +14 -9
- data/processor/command/debug.rb +8 -8
- data/processor/command/down.rb +6 -6
- data/processor/command/edit.rb +4 -0
- data/processor/command/eval.rb +2 -2
- data/processor/command/exit.rb +12 -9
- data/processor/command/finish.rb +25 -23
- data/processor/command/frame.rb +30 -26
- data/processor/command/help.rb +203 -185
- data/processor/command/help/{command.txt → command.md} +21 -18
- data/processor/command/help/examples.md +20 -0
- data/processor/command/help/filename.md +46 -0
- data/processor/command/help/location.md +34 -0
- data/processor/command/help/suffixes.md +19 -0
- data/processor/command/info.rb +6 -4
- data/processor/command/info_subcmd/breakpoints.rb +13 -13
- data/processor/command/info_subcmd/files.rb +35 -31
- data/processor/command/info_subcmd/frame.rb +82 -33
- data/processor/command/info_subcmd/macro.rb +1 -1
- data/processor/command/info_subcmd/program.rb +8 -5
- data/processor/command/info_subcmd/registers.rb +15 -13
- data/processor/command/kill.rb +23 -17
- data/processor/command/list.rb +63 -56
- data/processor/command/macro.rb +45 -28
- data/processor/command/next.rb +29 -23
- data/processor/command/pp.rb +11 -9
- data/processor/command/pr.rb +10 -8
- data/processor/command/ps.rb +5 -5
- data/processor/command/quit.rb +24 -17
- data/processor/command/raise.rb +6 -6
- data/processor/command/reload.rb +9 -2
- data/processor/command/reload_subcmd/command.rb +4 -4
- data/processor/command/restart.rb +9 -4
- data/processor/command/save.rb +9 -9
- data/processor/command/server.rb +18 -17
- data/processor/command/set.rb +8 -6
- data/processor/command/set_subcmd/confirm.rb +15 -2
- data/processor/command/set_subcmd/different.rb +7 -5
- data/processor/command/set_subcmd/highlight.rb +14 -3
- data/processor/command/set_subcmd/pc.rb +62 -0
- data/processor/command/set_subcmd/sp.rb +8 -2
- data/processor/command/shell.rb +25 -23
- data/processor/command/show.rb +9 -7
- data/processor/command/show_subcmd/confirm.rb +12 -1
- data/processor/command/show_subcmd/highlight.rb +13 -3
- data/processor/command/source.rb +27 -26
- data/processor/command/step.rb +52 -43
- data/processor/command/tbreak.rb +9 -4
- data/processor/command/unalias.rb +9 -7
- data/processor/command/undisplay.rb +11 -7
- data/processor/command/up.rb +18 -13
- data/processor/command/watchg.rb +20 -17
- data/processor/complete.rb +120 -0
- data/processor/default.rb +47 -43
- data/processor/list.rb +23 -6
- data/processor/load_cmds.rb +25 -105
- data/processor/location.rb +104 -96
- data/processor/mock.rb +12 -12
- data/processor/msg.rb +61 -52
- data/processor/validate.rb +36 -27
- data/test/data/fname-with-blank.right +0 -1
- data/test/data/trace-mingw.right +28 -0
- data/test/data/trace.right +0 -2
- data/test/functional/test-raise.rb +3 -0
- data/test/integration/helper.rb +16 -16
- data/test/integration/test-debugger-stop.rb +8 -2
- data/test/integration/test-quit.rb +16 -15
- data/test/integration/test-trace.rb +19 -10
- data/test/unit/cmd-helper.rb +4 -1
- data/test/unit/test-app-complete.rb +3 -1
- data/test/unit/test-app-options.rb +7 -1
- data/test/unit/test-app-run.rb +9 -1
- data/test/unit/test-cmd-alias.rb +1 -1
- data/test/unit/test-cmd-edit.rb +2 -0
- data/test/unit/test-cmd-help.rb +10 -5
- data/test/unit/test-cmd-parse_list_cmd.rb +3 -3
- data/test/unit/test-completion.rb +2 -2
- data/test/unit/test-proc-default.rb +34 -0
- data/trepanning.gemspec +15 -14
- metadata +70 -44
- data/README.textile +0 -50
- data/processor/command/help/examples.txt +0 -16
- data/processor/command/help/filename.txt +0 -40
- data/processor/command/help/location.txt +0 -37
- data/processor/command/help/suffixes.txt +0 -17
- data/processor/command/info_subcmd/registers_subcmd/dfp.rb +0 -28
- data/processor/command/info_subcmd/registers_subcmd/lfp.rb +0 -47
- data/processor/command/nocache.rb +0 -32
- data/processor/command/parsetree.rb +0 -56
data/test/integration/helper.rb
CHANGED
@@ -2,11 +2,11 @@ require 'diff/lcs'
|
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
4
|
DEFAULT_DEBUGGER_OPTS = {
|
5
|
-
:args => '',
|
6
|
-
:dbgr => '',
|
5
|
+
:args => '',
|
6
|
+
:dbgr => '',
|
7
7
|
:outfile => nil,
|
8
8
|
:short_cmd => nil,
|
9
|
-
:short_right => nil,
|
9
|
+
:short_right => nil,
|
10
10
|
:do_diff => true,
|
11
11
|
}
|
12
12
|
|
@@ -14,8 +14,8 @@ def run_debugger(testname, ruby_file, opts={})
|
|
14
14
|
opts = DEFAULT_DEBUGGER_OPTS.merge(opts)
|
15
15
|
srcdir = File.dirname(__FILE__)
|
16
16
|
datadir = File.join(srcdir, %w(.. data))
|
17
|
-
progdir = File.join(srcdir, %w(.. example))
|
18
|
-
|
17
|
+
progdir = File.join(srcdir, %w(.. example))
|
18
|
+
|
19
19
|
dbgr_dir = File.join(srcdir, %w(.. ..))
|
20
20
|
dbgr_short = File.join(%w(bin trepan))
|
21
21
|
dbgr_path = File.join(dbgr_dir, dbgr_short)
|
@@ -32,38 +32,38 @@ def run_debugger(testname, ruby_file, opts={})
|
|
32
32
|
FileUtils.rm(outfile) if File.exist?(outfile)
|
33
33
|
|
34
34
|
cmd = opts[:feed_input] ? "#{opts[:feed_input]} |" : ''
|
35
|
-
cmd +=
|
35
|
+
cmd +=
|
36
36
|
if opts[:standalone]
|
37
37
|
"%s %s %s >%s 2>&1" %
|
38
38
|
[RbConfig.ruby, programfile, opts[:args], outfile]
|
39
39
|
elsif opts[:nocommand]
|
40
|
-
"%s %s --nx %s '%s' %s >%s 2>&1" %
|
41
|
-
[RbConfig.ruby, dbgr_path, opts[:dbgr],
|
40
|
+
"%s %s --nx --basename --no-highlight %s '%s' %s >%s 2>&1" %
|
41
|
+
[RbConfig.ruby, dbgr_path, opts[:dbgr],
|
42
42
|
programfile, opts[:args], outfile]
|
43
43
|
else
|
44
|
-
"%s %s --nx --command %s %s '%s' %s >%s 2>&1" %
|
45
|
-
[RbConfig.ruby, dbgr_path, cmdfile, opts[:dbgr],
|
44
|
+
"%s %s --nx --basename --no-highlight --command %s %s '%s' %s >%s 2>&1" %
|
45
|
+
[RbConfig.ruby, dbgr_path, cmdfile, opts[:dbgr],
|
46
46
|
programfile, opts[:args], outfile]
|
47
47
|
end
|
48
48
|
puts cmd if opts[:verbose]
|
49
49
|
system(cmd)
|
50
|
-
return false unless 0 == $?.exitstatus
|
50
|
+
return false unless 0 == $?.exitstatus
|
51
51
|
if opts[:do_diff]
|
52
52
|
expected_lines = File.open(rightfile).readlines()
|
53
53
|
got_lines = File.open(outfile).readlines()
|
54
54
|
opts[:filter].call(got_lines, expected_lines) if opts[:filter]
|
55
55
|
# puts "=" * 80
|
56
56
|
# got_lines.map{|line| puts line}
|
57
|
-
|
57
|
+
|
58
58
|
# Seems to be a bug in LCS in that it will return a diff even if two
|
59
59
|
# files are the same.
|
60
60
|
return true if expected_lines == got_lines
|
61
|
-
|
61
|
+
|
62
62
|
sdiffs = Diff::LCS.sdiff(expected_lines, got_lines)
|
63
|
-
|
63
|
+
|
64
64
|
if sdiffs.empty?
|
65
65
|
FileUtils.rm(outfile)
|
66
|
-
else
|
66
|
+
else
|
67
67
|
puts cmd
|
68
68
|
sdiffs.each do |diff|
|
69
69
|
p diff
|
@@ -74,7 +74,7 @@ def run_debugger(testname, ruby_file, opts={})
|
|
74
74
|
return true # We already tested for false above
|
75
75
|
end
|
76
76
|
end
|
77
|
-
|
77
|
+
|
78
78
|
if __FILE__ == $0
|
79
79
|
run_debugger('testing', 'gcd1.rb')
|
80
80
|
end
|
@@ -1,11 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'test/unit'
|
3
|
+
require 'rbconfig'
|
3
4
|
require_relative 'helper'
|
4
5
|
|
5
6
|
class TestDebuggerStop < Test::Unit::TestCase
|
6
|
-
@@
|
7
|
+
@@name = File.basename(__FILE__, '.rb')[5..-1]
|
8
|
+
@@name = @@name[2..-1] if
|
9
|
+
(RbConfig::CONFIG['target_os'].start_with?('mingw') and
|
10
|
+
@@name =~ /^[A-Za-z]:/)
|
7
11
|
|
8
12
|
def test_it
|
13
|
+
skip "FIXME for mingw" if
|
14
|
+
RbConfig::CONFIG['target_os'].start_with?('mingw')
|
9
15
|
opts = {}
|
10
16
|
opts[:feed_input] = "echo 'info program ;; continue ;; quit!' "
|
11
17
|
opts[:filter] = Proc.new{|got_lines, correct_lines|
|
@@ -17,6 +23,6 @@ class TestDebuggerStop < Test::Unit::TestCase
|
|
17
23
|
got_lines[3].gsub!(/\(.*debugger-stop.rb[:]\d+ @\d+/,
|
18
24
|
'debugger-stop.rb:10 @1954')
|
19
25
|
}
|
20
|
-
assert_equal(true, run_debugger(@@
|
26
|
+
assert_equal(true, run_debugger(@@name, @@name + '.rb', opts))
|
21
27
|
end
|
22
28
|
end
|
@@ -3,21 +3,22 @@ require 'test/unit'
|
|
3
3
|
require_relative 'helper'
|
4
4
|
|
5
5
|
class TestQuit < Test::Unit::TestCase
|
6
|
-
|
6
|
+
@@NAME = File.basename(__FILE__, '.rb')[5..-1]
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
# def test_trepanx_set_confirm_off
|
9
|
+
# opts = {}
|
10
|
+
# opts[:filter] = Proc.new{|got_lines, correct_lines|
|
11
|
+
# got_lines[0] = "-> (null.rb:1 @0)\n"
|
12
|
+
# }
|
13
|
+
# assert_equal(true, run_debugger('quit2', 'null.rb', opts))
|
14
|
+
# end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
def test_trepan_quit
|
17
|
+
skip "Can't run from rake" if __FILE__ != $0
|
18
|
+
opts = {}
|
19
|
+
opts[:filter] = Proc.new{|got_lines, correct_lines|
|
20
|
+
got_lines[0] = "-> (null.rb:1 @0)\n"
|
21
|
+
}
|
22
|
+
assert_equal(true, run_debugger(@@NAME, 'null.rb', opts))
|
23
|
+
end
|
23
24
|
end
|
@@ -1,18 +1,27 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'test/unit'
|
3
3
|
require_relative 'helper'
|
4
|
+
require 'rbconfig'
|
4
5
|
|
5
6
|
class TestTrace < Test::Unit::TestCase
|
6
7
|
@@NAME = File.basename(__FILE__, '.rb')[5..-1]
|
7
|
-
TREPAN_LOC
|
8
|
+
TREPAN_LOC =
|
9
|
+
if RbConfig::CONFIG['target_os'].start_with?('mingw')
|
10
|
+
/.. \((?:[A-Za-z]:)?.+:\d+( @\d+)?\)/
|
11
|
+
else
|
12
|
+
/.. \(.+:\d+( @\d+)?\)/
|
13
|
+
end
|
8
14
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
def test_trepan_trace
|
16
|
+
opts = {:dbgr => '-x --basename', :args => '3 5', :nocommand => true}
|
17
|
+
if RbConfig::CONFIG['target_os'].start_with?('mingw')
|
18
|
+
opts[:short_right] = 'trace-mingw'
|
19
|
+
end
|
20
|
+
opts[:filter] = Proc.new{|got_lines, correct_lines|
|
21
|
+
got_lines.each do |line|
|
22
|
+
line.gsub!(/\(address 0x[0-9a-f]+ /, '(address 0xdeadbeef ')
|
23
|
+
end
|
24
|
+
}
|
25
|
+
assert_equal(true, run_debugger(@@NAME, 'gcd.rb', opts))
|
26
|
+
end
|
18
27
|
end
|
data/test/unit/cmd-helper.rb
CHANGED
@@ -15,6 +15,9 @@ module UnitHelper
|
|
15
15
|
def @cmdproc.msg(message, opts={})
|
16
16
|
@msgs << message
|
17
17
|
end
|
18
|
+
def @cmdproc.markdown(message, opts={})
|
19
|
+
@msgs << message
|
20
|
+
end
|
18
21
|
def @cmdproc.msgs
|
19
22
|
@msgs
|
20
23
|
end
|
@@ -30,7 +33,7 @@ module UnitHelper
|
|
30
33
|
reset_cmdproc_vars
|
31
34
|
end
|
32
35
|
module_function :common_setup
|
33
|
-
|
36
|
+
|
34
37
|
def reset_cmdproc_vars
|
35
38
|
@cmdproc.instance_variable_set('@msgs', [])
|
36
39
|
@cmdproc.instance_variable_set('@errmsgs', [])
|
@@ -31,7 +31,9 @@ class TestAppUtil < Test::Unit::TestCase
|
|
31
31
|
[13, [19, 'time']],
|
32
32
|
[19, [19, '']],
|
33
33
|
].each do |pos, expect|
|
34
|
-
assert_equal
|
34
|
+
assert_equal(expect, next_token(x, pos),
|
35
|
+
"Trouble with next_token(#{x}, #{pos})")
|
36
|
+
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
@@ -30,7 +30,13 @@ class TestAppOptions < Test::Unit::TestCase
|
|
30
30
|
assert_equal(orig_cd, @options[:chdir])
|
31
31
|
assert_not_equal('', @stderr.string)
|
32
32
|
assert_equal('', @stdout.string)
|
33
|
-
|
33
|
+
# Looks like on various MinGW systems Tempfile and tf.path and unlike don't
|
34
|
+
# work together
|
35
|
+
begin
|
36
|
+
File.unlink tf.path
|
37
|
+
rescue
|
38
|
+
end
|
39
|
+
|
34
40
|
# FIXME: add test where directory isn't executable.
|
35
41
|
end
|
36
42
|
|
data/test/unit/test-app-run.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'test/unit'
|
3
|
+
require 'rbconfig'
|
3
4
|
require_relative '../../app/run'
|
4
5
|
|
5
6
|
class TestAppRun < Test::Unit::TestCase
|
6
7
|
include Trepanning
|
7
8
|
def test_whence
|
8
|
-
|
9
|
+
resolved_file = whence_file('irb')
|
10
|
+
if RbConfig::CONFIG['target_os'].start_with?('mingw')
|
11
|
+
assert_equal(true, File.readable?(resolved_file),
|
12
|
+
"file #{resolved_file} should be readable")
|
13
|
+
else
|
14
|
+
assert_equal(true, File.executable?(resolved_file),
|
15
|
+
"file #{resolved_file} should be executable")
|
16
|
+
end
|
9
17
|
ng = whence_file('probably-does-not-exist')
|
10
18
|
assert_equal(true, File.executable?(ng) || ng == 'probably-does-not-exist')
|
11
19
|
end
|
data/test/unit/test-cmd-alias.rb
CHANGED
data/test/unit/test-cmd-edit.rb
CHANGED
@@ -19,6 +19,8 @@ class TestCommandEdit < Test::Unit::TestCase
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def test_basic
|
22
|
+
editor = ENV['EDITOR'] || '/bin/ex'
|
23
|
+
skip "Can't find editor to use" unless File.executable?(editor)
|
22
24
|
old_editor = ENV['EDITOR']
|
23
25
|
ENV['EDITOR'] = '#'
|
24
26
|
base_file = File.basename(__FILE__)
|
data/test/unit/test-cmd-help.rb
CHANGED
@@ -14,6 +14,11 @@ class TestCommandHelp < Test::Unit::TestCase
|
|
14
14
|
def check_help(should_not_have, *args)
|
15
15
|
@cmdproc.instance_variable_set('@msgs', [])
|
16
16
|
@cmdproc.instance_variable_set('@errmsgs', [])
|
17
|
+
@cmdproc.instance_variable_set('@settings', {
|
18
|
+
:highlight => false,
|
19
|
+
:maxwidth => 85,
|
20
|
+
} )
|
21
|
+
@cmdproc.instance_variable_set('@highlight', 80)
|
17
22
|
arg_str = args.join(' ')
|
18
23
|
@my_cmd.run([@name] + args)
|
19
24
|
shoulda = should_not_have ? ['no ', ''] : ['', 'no ']
|
@@ -26,16 +31,16 @@ class TestCommandHelp < Test::Unit::TestCase
|
|
26
31
|
"Expecting %serror for %s.\n Got %s" %
|
27
32
|
[shoulda[1], arg_str, msgs])
|
28
33
|
end
|
29
|
-
|
34
|
+
|
30
35
|
def test_help_command
|
31
36
|
|
32
37
|
# Test we can run 'help *cmd* for each command
|
33
|
-
@cmds.keys.each do |cmd_name|
|
34
|
-
check_help(false, cmd_name)
|
38
|
+
@cmds.keys.each do |cmd_name|
|
39
|
+
check_help(false, cmd_name)
|
35
40
|
end
|
36
41
|
|
37
42
|
# Test we can run 'help *alias* for each alias
|
38
|
-
@cmdproc.aliases.keys.each do |alias_name|
|
43
|
+
@cmdproc.aliases.keys.each do |alias_name|
|
39
44
|
check_help(false, alias_name)
|
40
45
|
end
|
41
46
|
|
@@ -88,7 +93,7 @@ class TestCommandHelp < Test::Unit::TestCase
|
|
88
93
|
|
89
94
|
def test_help_subcommand
|
90
95
|
# Get list of commands with subcmds
|
91
|
-
cmd_names = @cmds.values.map do |c|
|
96
|
+
cmd_names = @cmds.values.map do |c|
|
92
97
|
c.instance_variable_defined?(:@subcmds) ? c.name : nil
|
93
98
|
end.compact
|
94
99
|
cmd_names.each do |cmd_name|
|
@@ -20,9 +20,9 @@ class TestCommandParseListCmd < Test::Unit::TestCase
|
|
20
20
|
["#{__FILE__} 10", [short_file, 5, 14]],
|
21
21
|
['tmpdir.rb', ['tmpdir.rb', 1, listsize]],
|
22
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]],
|
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
26
|
].each do |arg_str, expect|
|
27
27
|
got = @cmdproc.parse_list_cmd(arg_str, listsize, listsize/2)[1..-1]
|
28
28
|
got[0] = File.basename(got[0])
|
@@ -33,11 +33,11 @@ class TestCompletion < Test::Unit::TestCase
|
|
33
33
|
].each do |line, token, expect_completion|
|
34
34
|
# require_relative '../../lib/trepanning'
|
35
35
|
# debugger if line == 'help syntax co'
|
36
|
-
assert_equal(expect_completion,
|
36
|
+
assert_equal(expect_completion,
|
37
37
|
dbgr.completion_method(token, line),
|
38
38
|
"Bad completion on #{line.inspect} with #{token.inspect}")
|
39
39
|
end
|
40
|
-
assert(dbgr.completion_method('', '').size > 30,
|
40
|
+
assert(dbgr.completion_method('', '').size > 30,
|
41
41
|
'Initial completion should return more than 30 commands')
|
42
42
|
end
|
43
43
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
# Test Trepan::CmdProcessor::Default
|
5
|
+
class TestProcDefault < Test::Unit::TestCase
|
6
|
+
|
7
|
+
DIR = File.dirname(__FILE__)
|
8
|
+
DEFAULT_RBFILE = File.join(%W(#{DIR} .. .. processor default.rb))
|
9
|
+
|
10
|
+
def test_maxwidth_setting
|
11
|
+
ENV['COLUMNS'] = '50'
|
12
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS') if
|
13
|
+
Trepan::CmdProcessor.const_defined?('DEFAULT_SETTINGS')
|
14
|
+
load DEFAULT_RBFILE
|
15
|
+
assert_equal(50, Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
16
|
+
'Pick up COLUMNS environment')
|
17
|
+
|
18
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS')
|
19
|
+
load DEFAULT_RBFILE
|
20
|
+
|
21
|
+
ENV['COLUMNS'] = '0'
|
22
|
+
assert_operator(Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
23
|
+
:>=, 10,
|
24
|
+
'Change too small COLUMNS environment value')
|
25
|
+
|
26
|
+
Trepan::CmdProcessor.send(:remove_const, 'DEFAULT_SETTINGS')
|
27
|
+
load DEFAULT_RBFILE
|
28
|
+
|
29
|
+
ENV['COLUMNS'] = 'non-numeric-string'
|
30
|
+
assert_operator(Trepan::CmdProcessor::DEFAULT_SETTINGS[:maxwidth],
|
31
|
+
:>=, 10,
|
32
|
+
'Change too small COLUMNS environment value')
|
33
|
+
end
|
34
|
+
end
|
data/trepanning.gemspec
CHANGED
@@ -1,28 +1,29 @@
|
|
1
1
|
# -*- Ruby -*-
|
2
2
|
# -*- encoding: utf-8 -*-
|
3
3
|
require 'rake'
|
4
|
-
require 'rubygems' unless
|
4
|
+
require 'rubygems' unless
|
5
5
|
Object.const_defined?(:Gem)
|
6
|
-
require File.dirname(__FILE__) + "/app/options" unless
|
6
|
+
require File.dirname(__FILE__) + "/app/options" unless
|
7
7
|
Object.const_defined?(:'Trepan')
|
8
8
|
|
9
9
|
Gem::Specification.new do |spec|
|
10
10
|
spec.authors = ['R. Bernstein']
|
11
11
|
spec.date = Time.now
|
12
12
|
spec.description = <<-EOF
|
13
|
-
A
|
13
|
+
A Ruby debugger with both high and low-level debugging support.
|
14
14
|
|
15
|
-
|
15
|
+
To provide the advanced features this version works only with a
|
16
|
+
patched MRI Ruby 1.9.3 runtime.
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
See also rbx-trepanning for a version that works with Rubinius.
|
18
|
+
For a version that works with Ruby 2.1.5, install a version
|
19
|
+
starting with 2.15.
|
20
20
|
EOF
|
21
|
-
spec.add_dependency('rb-
|
22
|
-
spec.add_dependency('
|
23
|
-
spec.add_dependency('
|
24
|
-
spec.add_dependency('
|
25
|
-
spec.
|
21
|
+
spec.add_dependency('rb-trace', '~> 0.5')
|
22
|
+
spec.add_dependency('columnize', '~> 0.9')
|
23
|
+
spec.add_dependency('redcarpet', '~> 3.2')
|
24
|
+
spec.add_dependency('coderay', '~> 1.1')
|
25
|
+
spec.add_dependency('term-ansicolor', '~> 1.3')
|
26
|
+
spec.add_development_dependency('diff-lcs', '~> 0') # For testing only
|
26
27
|
spec.author = 'R. Bernstein'
|
27
28
|
spec.bindir = 'bin'
|
28
29
|
spec.email = 'rockyb@rubyforge.net'
|
@@ -33,9 +34,9 @@ EOF
|
|
33
34
|
spec.name = 'trepanning'
|
34
35
|
spec.license = 'MIT'
|
35
36
|
spec.platform = Gem::Platform::RUBY
|
37
|
+
spec.required_ruby_version = '~> 1.9.3'
|
36
38
|
spec.require_path = 'lib'
|
37
|
-
|
38
|
-
spec.summary = 'Modular Ruby 1.9.2 or 1.9.3 Debugger'
|
39
|
+
spec.summary = 'Enhanced Ruby 1.9.3 Debugger'
|
39
40
|
spec.version = Trepan::VERSION
|
40
41
|
|
41
42
|
# Make the readme file the start page for the generated html
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trepanning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.93.32
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,78 +9,94 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-03-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: rb-
|
15
|
+
name: rb-trace
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: '0.5'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: '0.5'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: columnize
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
37
|
+
version: '0.9'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: '0.9'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: redcarpet
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '3.2'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.2'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: coderay
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '1.1'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '1.1'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: term-ansicolor
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.3'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.3'
|
78
94
|
- !ruby/object:Gem::Dependency
|
79
95
|
name: diff-lcs
|
80
96
|
requirement: !ruby/object:Gem::Requirement
|
81
97
|
none: false
|
82
98
|
requirements:
|
83
|
-
- -
|
99
|
+
- - ~>
|
84
100
|
- !ruby/object:Gem::Version
|
85
101
|
version: '0'
|
86
102
|
type: :development
|
@@ -88,14 +104,22 @@ dependencies:
|
|
88
104
|
version_requirements: !ruby/object:Gem::Requirement
|
89
105
|
none: false
|
90
106
|
requirements:
|
91
|
-
- -
|
107
|
+
- - ~>
|
92
108
|
- !ruby/object:Gem::Version
|
93
109
|
version: '0'
|
94
|
-
description: !
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
110
|
+
description: ! 'A Ruby debugger with both high and low-level debugging support.
|
111
|
+
|
112
|
+
|
113
|
+
To provide the advanced features this version works only with a
|
114
|
+
|
115
|
+
patched MRI Ruby 1.9.3 runtime.
|
116
|
+
|
117
|
+
|
118
|
+
For a version that works with Ruby 2.1.5, install a version
|
119
|
+
|
120
|
+
starting with 2.15.
|
121
|
+
|
122
|
+
'
|
99
123
|
email: rockyb@rubyforge.net
|
100
124
|
executables:
|
101
125
|
- trepan
|
@@ -103,11 +127,12 @@ extensions: []
|
|
103
127
|
extra_rdoc_files: []
|
104
128
|
files:
|
105
129
|
- .gitignore
|
130
|
+
- COPYING
|
106
131
|
- ChangeLog
|
107
132
|
- LICENSE
|
108
133
|
- Makefile
|
109
134
|
- NEWS
|
110
|
-
- README.
|
135
|
+
- README.md
|
111
136
|
- Rakefile
|
112
137
|
- app/.gitignore
|
113
138
|
- app/Makefile
|
@@ -128,6 +153,7 @@ files:
|
|
128
153
|
- app/frame.rb
|
129
154
|
- app/irb.rb
|
130
155
|
- app/iseq.rb
|
156
|
+
- app/markdown.rb
|
131
157
|
- app/mock.rb
|
132
158
|
- app/options.rb
|
133
159
|
- app/run.rb
|
@@ -193,11 +219,11 @@ files:
|
|
193
219
|
- processor/command/help.rb
|
194
220
|
- processor/command/help/.gitignore
|
195
221
|
- processor/command/help/README
|
196
|
-
- processor/command/help/command.
|
197
|
-
- processor/command/help/examples.
|
198
|
-
- processor/command/help/filename.
|
199
|
-
- processor/command/help/location.
|
200
|
-
- processor/command/help/suffixes.
|
222
|
+
- processor/command/help/command.md
|
223
|
+
- processor/command/help/examples.md
|
224
|
+
- processor/command/help/filename.md
|
225
|
+
- processor/command/help/location.md
|
226
|
+
- processor/command/help/suffixes.md
|
201
227
|
- processor/command/info.rb
|
202
228
|
- processor/command/info_subcmd/.gitignore
|
203
229
|
- processor/command/info_subcmd/args.rb
|
@@ -210,9 +236,7 @@ files:
|
|
210
236
|
- processor/command/info_subcmd/program.rb
|
211
237
|
- processor/command/info_subcmd/registers.rb
|
212
238
|
- processor/command/info_subcmd/registers_subcmd/.gitignore
|
213
|
-
- processor/command/info_subcmd/registers_subcmd/dfp.rb
|
214
239
|
- processor/command/info_subcmd/registers_subcmd/helper.rb
|
215
|
-
- processor/command/info_subcmd/registers_subcmd/lfp.rb
|
216
240
|
- processor/command/info_subcmd/registers_subcmd/pc.rb
|
217
241
|
- processor/command/info_subcmd/registers_subcmd/sp.rb
|
218
242
|
- processor/command/info_subcmd/return.rb
|
@@ -231,8 +255,6 @@ files:
|
|
231
255
|
- processor/command/list.rb
|
232
256
|
- processor/command/macro.rb
|
233
257
|
- processor/command/next.rb
|
234
|
-
- processor/command/nocache.rb
|
235
|
-
- processor/command/parsetree.rb
|
236
258
|
- processor/command/pp.rb
|
237
259
|
- processor/command/pr.rb
|
238
260
|
- processor/command/ps.rb
|
@@ -271,6 +293,7 @@ files:
|
|
271
293
|
- processor/command/set_subcmd/max_subcmd/stack.rb
|
272
294
|
- processor/command/set_subcmd/max_subcmd/string.rb
|
273
295
|
- processor/command/set_subcmd/max_subcmd/width.rb
|
296
|
+
- processor/command/set_subcmd/pc.rb
|
274
297
|
- processor/command/set_subcmd/reload.rb
|
275
298
|
- processor/command/set_subcmd/return.rb
|
276
299
|
- processor/command/set_subcmd/sp.rb
|
@@ -329,6 +352,7 @@ files:
|
|
329
352
|
- processor/command/undisplay.rb
|
330
353
|
- processor/command/up.rb
|
331
354
|
- processor/command/watchg.rb
|
355
|
+
- processor/complete.rb
|
332
356
|
- processor/default.rb
|
333
357
|
- processor/display.rb
|
334
358
|
- processor/eval.rb
|
@@ -362,6 +386,7 @@ files:
|
|
362
386
|
- test/data/quit2.cmd
|
363
387
|
- test/data/quit2.right
|
364
388
|
- test/data/testing.cmd
|
389
|
+
- test/data/trace-mingw.right
|
365
390
|
- test/data/trace.cmd
|
366
391
|
- test/data/trace.right
|
367
392
|
- test/example/.gitignore
|
@@ -441,6 +466,7 @@ files:
|
|
441
466
|
- test/unit/test-io-tcp.rb
|
442
467
|
- test/unit/test-io-tcpclient.rb
|
443
468
|
- test/unit/test-io-tcpserver.rb
|
469
|
+
- test/unit/test-proc-default.rb
|
444
470
|
- test/unit/test-proc-eval.rb
|
445
471
|
- test/unit/test-proc-frame.rb
|
446
472
|
- test/unit/test-proc-help.rb
|
@@ -460,15 +486,15 @@ rdoc_options:
|
|
460
486
|
- --main
|
461
487
|
- README
|
462
488
|
- --title
|
463
|
-
- Trepan
|
489
|
+
- Trepan 1.93.32 Documentation
|
464
490
|
require_paths:
|
465
491
|
- lib
|
466
492
|
required_ruby_version: !ruby/object:Gem::Requirement
|
467
493
|
none: false
|
468
494
|
requirements:
|
469
|
-
- -
|
495
|
+
- - ~>
|
470
496
|
- !ruby/object:Gem::Version
|
471
|
-
version:
|
497
|
+
version: 1.9.3
|
472
498
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
473
499
|
none: false
|
474
500
|
requirements:
|
@@ -477,8 +503,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
477
503
|
version: '0'
|
478
504
|
requirements: []
|
479
505
|
rubyforge_project:
|
480
|
-
rubygems_version: 1.8.23
|
506
|
+
rubygems_version: 1.8.23.2
|
481
507
|
signing_key:
|
482
508
|
specification_version: 3
|
483
|
-
summary:
|
509
|
+
summary: Enhanced Ruby 1.9.3 Debugger
|
484
510
|
test_files: []
|