rbx-trepanning 0.0.4-universal-rubinius-1.2 → 0.0.6-universal-rubinius-1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +682 -0
- data/NEWS +19 -0
- data/README.textile +8 -9
- data/Rakefile +8 -8
- data/app/complete.rb +52 -0
- data/app/complete.rbc +1288 -0
- data/app/irb.rb +1 -2
- data/app/irb.rbc +55 -72
- data/app/llvm.rbc +780 -878
- data/app/method.rb +1 -1
- data/app/method.rbc +31 -35
- data/app/method_name.rbc +2467 -0
- data/app/options.rb +7 -24
- data/app/options.rbc +238 -132
- data/app/rbx-llvm.rbc +2478 -0
- data/app/util.rb +3 -3
- data/app/util.rbc +23 -27
- data/bin/trepanx +4 -3
- data/bin/trepanx.compiled.rbc +42 -32
- data/data/irbrc +41 -0
- data/data/irbrc.compiled.rbc +640 -0
- data/interface/base_intf.rb +9 -5
- data/interface/base_intf.rbc +200 -146
- data/interface/comcodes.rb +10 -8
- data/interface/comcodes.rbc +68 -26
- data/interface/script.rbc +21 -9
- data/interface/user.rb +74 -8
- data/interface/user.rbc +1702 -156
- data/io/input.rb +37 -14
- data/io/input.rbc +869 -320
- data/io/tcpclient.rb +7 -1
- data/io/tcpclient.rbc +205 -113
- data/io/tcpfns.rb +5 -3
- data/io/tcpfns.rbc +82 -40
- data/io/tcpserver.rb +13 -10
- data/io/tcpserver.rbc +236 -183
- data/lib/trepanning.rb +62 -21
- data/lib/trepanning.rbc +1304 -874
- data/lib/{trepanning.rb.orig → trepanning2.rb} +12 -4
- data/processor/breakpoint.rb +4 -1
- data/processor/command/base/cmd.rb +48 -3
- data/processor/command/base/subcmd.rb +2 -1
- data/processor/command/base/submgr.rb +23 -20
- data/processor/command/base/subsubmgr.rb +13 -2
- data/processor/command/complete.rb +7 -17
- data/processor/command/continue.rb +19 -11
- data/processor/command/disassemble.rb +39 -12
- data/processor/command/eval.rb +23 -5
- data/processor/command/help.rb +60 -6
- data/processor/command/info_subcmd/{file.rb → files.rb} +76 -18
- data/processor/command/info_subcmd/line.rb +86 -0
- data/processor/command/info_subcmd/program.rb +2 -11
- data/processor/command/info_subcmd/ruby.rb +62 -0
- data/processor/command/info_subcmd/variables.rb +7 -0
- data/processor/command/irb.rb +39 -7
- data/processor/command/macro.rb +76 -0
- data/processor/command/set_subcmd/confirm.rb +24 -0
- data/processor/command/set_subcmd/max.rb +4 -5
- data/processor/command/show.rb +11 -0
- data/processor/command/show_subcmd/auto.rb +1 -0
- data/processor/command/show_subcmd/basename.rb +1 -2
- data/processor/command/show_subcmd/confirm.rb +18 -0
- data/processor/command/show_subcmd/max.rb +0 -2
- data/processor/command/source.rb +0 -1
- data/processor/default.rb +2 -0
- data/processor/disassemble.rb +1 -0
- data/processor/load_cmds.rb +104 -20
- data/processor/location.rb +11 -12
- data/processor/main.rb +10 -6
- data/processor/mock.rb +6 -2
- data/processor/stepping.rb +1 -4
- data/processor/subcmd.rb +3 -2
- data/processor/validate.rb +3 -3
- data/sample/list-terminal-colors.rbc +158 -4
- data/sample/rocky-trepanx-colors.rb +15 -7
- data/sample/rocky-trepanx-colors.rbc +530 -0
- data/test/data/quit2.cmd +6 -0
- data/test/data/quit2.right +3 -0
- data/test/data/step-bug.cmd +11 -0
- data/test/data/step-bug.right +3 -0
- data/test/example/step-bug.rb +14 -0
- data/test/integration/helper.rb +1 -1
- data/test/integration/skip-test-step-bug.rb +17 -0
- data/test/integration/test-quit.rb +11 -0
- data/test/unit/test-app-util.rb +0 -1
- data/test/unit/test-base-cmd.rb +47 -0
- data/test/unit/test-base-subcmd.rb +2 -2
- data/test/unit/test-base-submgr.rb +24 -0
- data/test/unit/test-cmd-help.rb +4 -0
- data/test/unit/test-completion.rb +38 -0
- data/test/unit/test-intf-user.rb +2 -2
- data/test/unit/test-io-tcpclient.rb +3 -2
- data/test/unit/test-proc-eval.rb +1 -1
- data/test/unit/test-proc-load_cmds.rb +9 -0
- data/test/unit/test-subcmd-help.rb +1 -5
- metadata +182 -167
- data/app/options.rb.orig +0 -154
- data/bin/trepan.orig +0 -0
- data/bin/trepan.rej +0 -11
- data/lib/trepanning.rb.rej +0 -11
- data/sample/rocky-dot-trepanrc.orig +0 -0
- data/sample/rocky-dot-trepanrc.rej +0 -11
data/NEWS
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
Feb 15, 2011 (0.0.6)
|
2
|
+
- Repackage using rubinus platform 1.2 rather than 1.2.1
|
3
|
+
|
4
|
+
Feb 15, 2011 (0.0.5)
|
5
|
+
- "disassemble" command: allow disassembly of specified line numbers
|
6
|
+
- GNU Readline:
|
7
|
+
* Start GNU readline tab (command) completion.
|
8
|
+
* Save and restore command history
|
9
|
+
* add --readline and --no-readline options to trepanx
|
10
|
+
- Macros can return more than one command now
|
11
|
+
- help
|
12
|
+
* "help macros" shows all macro names
|
13
|
+
* "help aliases" shows all alias names
|
14
|
+
* "help *" lists macros and aliases now
|
15
|
+
- start "info line"
|
16
|
+
- "info file" has/shows File::stat()'s mtime and ctime
|
17
|
+
- be able to pass --verbose to ruby to rake
|
18
|
+
|
19
|
+
|
1
20
|
Feb 1, 2011 (0.0.4)
|
2
21
|
- Add Remote debugging interface. Add options --server --port
|
3
22
|
- Add Syntax highlighting on Ruby and Rubinus LLVM listings and locations
|
data/README.textile
CHANGED
@@ -8,14 +8,13 @@ There is a "google group mailing list":http://groups.google.com/group/ruby-debug
|
|
8
8
|
|
9
9
|
To run initially:
|
10
10
|
|
11
|
-
bc.
|
12
|
-
$ trepanx my-ruby-program.rb
|
11
|
+
bc. $ trepanx my-ruby-program.rb
|
13
12
|
|
14
13
|
Or to call from inside your code:
|
15
14
|
|
16
|
-
bc.
|
17
|
-
|
18
|
-
|
15
|
+
bc. require 'trepanning'
|
16
|
+
debugger # Don't stop here...
|
17
|
+
work # but stop here.
|
19
18
|
|
20
19
|
If you want an immediate stop:
|
21
20
|
|
@@ -23,10 +22,10 @@ bc. debugger(:immediate=>true)
|
|
23
22
|
|
24
23
|
Finally, if you put in your .trepanx
|
25
24
|
|
26
|
-
bc.
|
27
|
-
|
28
|
-
|
29
|
-
}
|
25
|
+
bc. Rubinius::Loader.debugger = proc {
|
26
|
+
require 'trepanning';
|
27
|
+
Trepan.start(:skip_loader => :Xdebug)
|
28
|
+
}
|
30
29
|
|
31
30
|
Then you can use the -Xdebug option the Ruby, e.g.
|
32
31
|
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
raise RuntimeError, 'This package is for Rubinius 1.2 or 1.2.1dev only!' unless
|
4
4
|
Object.constants.include?('Rubinius') &&
|
5
5
|
Rubinius.constants.include?('VM') &&
|
6
|
-
%w(1.2 1.2.
|
6
|
+
%w(1.2.1 1.2.2dev).member?(Rubinius::VERSION)
|
7
7
|
|
8
8
|
require 'rubygems'
|
9
9
|
require 'rake/gempackagetask'
|
@@ -23,15 +23,14 @@ task :gem=>:gemspec do
|
|
23
23
|
Dir.chdir(ROOT_DIR) do
|
24
24
|
sh "gem build .gemspec"
|
25
25
|
FileUtils.mkdir_p 'pkg'
|
26
|
-
FileUtils.mv("#{gemspec.
|
27
|
-
"pkg/#{gemspec.name}-#{gemspec.version}-universal-rubinius-1.2.gem")
|
26
|
+
FileUtils.mv("#{gemspec.file_name}", "pkg/#{gemspec.file_name}")
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
31
30
|
desc "Install the gem locally"
|
32
31
|
task :install => :gem do
|
33
32
|
Dir.chdir(ROOT_DIR) do
|
34
|
-
sh %{gem install --local pkg/#{gemspec.
|
33
|
+
sh %{gem install --local pkg/#{gemspec.file_name}}
|
35
34
|
end
|
36
35
|
end
|
37
36
|
|
@@ -46,12 +45,13 @@ def run_standalone_ruby_files(list)
|
|
46
45
|
end
|
47
46
|
end
|
48
47
|
|
49
|
-
def run_standalone_ruby_file(directory)
|
48
|
+
def run_standalone_ruby_file(directory, opts={})
|
50
49
|
puts ('*' * 10) + ' ' + directory + ' ' + ('*' * 10)
|
51
50
|
Dir.chdir(directory) do
|
52
51
|
Dir.glob('*.rb').each do |ruby_file|
|
53
52
|
puts(('-' * 20) + ' ' + ruby_file + ' ' + ('-' * 20))
|
54
53
|
system(RUBY_PATH, ruby_file)
|
54
|
+
break if $?.exitstatus != 0 && !opts[:continue]
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -65,19 +65,19 @@ desc 'Test units - the smaller tests'
|
|
65
65
|
Rake::TestTask.new(:'test:unit') do |t|
|
66
66
|
t.test_files = FileList['test/unit/**/test-*.rb']
|
67
67
|
# t.pattern = 'test/**/*test-*.rb' # instead of above
|
68
|
-
t.
|
68
|
+
t.options = '--verbose' if $VERBOSE
|
69
69
|
end
|
70
70
|
|
71
71
|
desc 'Test functional - the medium-sized tests'
|
72
72
|
Rake::TestTask.new(:'test:functional') do |t|
|
73
73
|
t.test_files = FileList['test/functional/**/test-*.rb']
|
74
|
-
t.
|
74
|
+
t.options = '--verbose' if $VERBOSE
|
75
75
|
end
|
76
76
|
|
77
77
|
desc 'Test integration - end-to-end blackbox tests'
|
78
78
|
Rake::TestTask.new(:'test:integration') do |t|
|
79
79
|
t.test_files = FileList['test/integration/**/test-*.rb']
|
80
|
-
t.
|
80
|
+
t.options = '--verbose' if $VERBOSE
|
81
81
|
end
|
82
82
|
|
83
83
|
desc 'Test everything - unit tests for now.'
|
data/app/complete.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Copyright (C) 2011 Rocky Bernstein <rockyb@rubyforge.net>
|
2
|
+
class Trepan
|
3
|
+
module Complete
|
4
|
+
|
5
|
+
module_function
|
6
|
+
|
7
|
+
# Return an Array of String found from Array of String
|
8
|
+
# +complete_ary+ which start out with String +prefix+.
|
9
|
+
def complete_token(complete_ary, prefix)
|
10
|
+
complete_ary.select { |cmd| cmd.to_s.start_with?(prefix) }.sort
|
11
|
+
end
|
12
|
+
|
13
|
+
def complete_token_with_next(complete_hash, prefix)
|
14
|
+
result = []
|
15
|
+
complete_hash.each do |cmd_name, cmd_obj|
|
16
|
+
result << [cmd_name, cmd_obj] if cmd_name.to_s.start_with?(prefix)
|
17
|
+
end
|
18
|
+
result.sort{|a, b| a[0] <=> b[0]}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Find all starting matches in Hash +aliases+ that start with +prefix+,
|
22
|
+
# but filter out any matches already in +expanded+.
|
23
|
+
def complete_token_filtered(aliases, prefix, expanded)
|
24
|
+
complete_ary = aliases.keys
|
25
|
+
complete_ary.select { |cmd|
|
26
|
+
cmd.to_s.start_with?(prefix) && ! expanded.member?(aliases[cmd])}.sort
|
27
|
+
end
|
28
|
+
|
29
|
+
# Find all starting matches in Hash +aliases+ that start with +prefix+,
|
30
|
+
# but filter out any matches already in +expanded+.
|
31
|
+
def complete_token_filtered_with_next(aliases, prefix, expanded,
|
32
|
+
commands)
|
33
|
+
complete_ary = aliases.keys
|
34
|
+
expanded_ary = expanded.keys
|
35
|
+
result = []
|
36
|
+
complete_ary.each do |cmd|
|
37
|
+
if cmd.to_s.start_with?(prefix) &&
|
38
|
+
!expanded_ary.member?(aliases[cmd])
|
39
|
+
result << [cmd, commands[aliases[cmd]]]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
result
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
if __FILE__ == $0
|
48
|
+
include Trepan::Complete
|
49
|
+
hash = {'ab' => 1, 'aac' => 2, 'aa' => 3, 'b' => 4}
|
50
|
+
p complete_token(hash.keys, 'a')
|
51
|
+
p complete_token_with_next(hash, 'a')
|
52
|
+
end
|