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/app/options.rb.orig
DELETED
@@ -1,154 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# -*- coding: utf-8 -*-
|
3
|
-
# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
|
4
|
-
#=== Summary
|
5
|
-
# Parses command-line options.
|
6
|
-
#=== Options
|
7
|
-
#
|
8
|
-
#<tt>--cd=DIR</tt>
|
9
|
-
# Change current directory to DIR.
|
10
|
-
#
|
11
|
-
#<tt>--command</tt> <i>file</i>::
|
12
|
-
# Run debugger command file <i>file</i>
|
13
|
-
#
|
14
|
-
#<tt>--nx</tt>::
|
15
|
-
# Don’t execute commands found in any initialization
|
16
|
-
# files, e.g. <tt>.rdebugrc</tt>.
|
17
|
-
#
|
18
|
-
#<tt>--restore=PROFILE</tt>::
|
19
|
-
# Debugger command file which restores debugger settings,
|
20
|
-
# resumably saved before a 'restart' debugger command.
|
21
|
-
#
|
22
|
-
#<tt>--version</tt>::
|
23
|
-
# Show the version number.
|
24
|
-
#
|
25
|
-
#<tt>--help</tt>::
|
26
|
-
# Show invocation help and exit.
|
27
|
-
|
28
|
-
require 'optparse'
|
29
|
-
class Trepan
|
30
|
-
require 'rubygems'; require 'require_relative'
|
31
|
-
require_relative 'default'
|
32
|
-
|
33
|
-
Trepan::VERSION = '0.0.4.dev'
|
34
|
-
Trepan::PROGRAM = 'trepanx'
|
35
|
-
|
36
|
-
def self.show_version
|
37
|
-
"#{PROGRAM}, version #{VERSION}"
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.copy_default_options
|
41
|
-
options = {}
|
42
|
-
DEFAULT_CMDLINE_SETTINGS.each do |key, value|
|
43
|
-
begin
|
44
|
-
options[key] = value.clone
|
45
|
-
rescue TypeError
|
46
|
-
options[key] = value
|
47
|
-
end
|
48
|
-
end
|
49
|
-
options
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.setup_options(options, stdout=$stdout, stderr=$stderr)
|
53
|
-
OptionParser.new do |opts|
|
54
|
-
opts.banner = <<EOB
|
55
|
-
#{show_version}
|
56
|
-
Usage: #{PROGRAM} [options] <script.rb> -- <script.rb parameters>
|
57
|
-
EOB
|
58
|
-
opts.on('--client',
|
59
|
-
"Connect to out-of-process program") do
|
60
|
-
if options[:server]
|
61
|
-
stderr.puts "--server option previously given. --client option ignored."
|
62
|
-
else
|
63
|
-
options[:client] = true
|
64
|
-
end
|
65
|
-
end
|
66
|
-
opts.on('-c', '--command FILE', String,
|
67
|
-
"Execute debugger commands from FILE") do |cmdfile|
|
68
|
-
if File.readable?(cmdfile)
|
69
|
-
options[:cmdfiles] << cmdfile
|
70
|
-
elsif File.exists?(cmdfile)
|
71
|
-
stderr.puts "Command file '#{cmdfile}' is not readable. Option ignored."
|
72
|
-
else
|
73
|
-
stderr.puts "Command file '#{cmdfile}' does not exist."
|
74
|
-
end
|
75
|
-
end
|
76
|
-
opts.on('--nx',
|
77
|
-
"Do not run debugger initialization file #{CMD_INITFILE}") do
|
78
|
-
options[:nx] = true
|
79
|
-
end
|
80
|
-
# opts.on('--output FILE', String, "Name of file to record output") do |outfile|
|
81
|
-
# options[:outfile] = outfile
|
82
|
-
# end
|
83
|
-
opts.on("--cd DIR", String, "Change current directory to DIR") do |dir|
|
84
|
-
if File.directory?(dir)
|
85
|
-
if File.executable?(dir)
|
86
|
-
options[:chdir] = dir
|
87
|
-
else
|
88
|
-
stderr.puts "Can't cd to #{dir}. Option --cd ignored."
|
89
|
-
end
|
90
|
-
else
|
91
|
-
stderr.puts "\"#{dir}\" is not a directory. Option --cd ignored."
|
92
|
-
end
|
93
|
-
end
|
94
|
-
opts.on("-h", "--host NAME", String,
|
95
|
-
"Host or IP used in TCP connections for --server or --client. " +
|
96
|
-
"Default is #{DEFAULT_SETTINGS[:host].inspect}.") do
|
97
|
-
|name_or_ip|
|
98
|
-
options[:host] = name_or_ip
|
99
|
-
end
|
100
|
-
opts.on("-p", "--port NUMBER", Integer,
|
101
|
-
"Port number used in TCP connections for --server or --client. " +
|
102
|
-
"Default is #{DEFAULT_SETTINGS[:port]}.") do
|
103
|
-
|num|
|
104
|
-
options[:port] = num
|
105
|
-
end
|
106
|
-
opts.on("--restore PROFILE", String,
|
107
|
-
"Restore debugger state using PROFILE") do |profile|
|
108
|
-
if File.readable?(profile)
|
109
|
-
options[:restore_profile] = profile
|
110
|
-
stderr.puts "Debugger command file #{profile} is not readable. --restore option ignored."
|
111
|
-
end
|
112
|
-
end
|
113
|
-
opts.on('--server',
|
114
|
-
"Set up for out-of-process debugging") do
|
115
|
-
if options[:client]
|
116
|
-
stderr.puts "--client option previously given. --server option ignored."
|
117
|
-
else
|
118
|
-
options[:server] = true
|
119
|
-
end
|
120
|
-
end
|
121
|
-
opts.on('--[no-]terminal',
|
122
|
-
"Set output for terminal highlighting") do |v|
|
123
|
-
options[:terminal] = ((v) ? :term : nil)
|
124
|
-
end
|
125
|
-
opts.on_tail("-?", "--help", "Show this message") do
|
126
|
-
options[:help] = true
|
127
|
-
stdout.puts opts
|
128
|
-
end
|
129
|
-
opts.on_tail("-v", "--version",
|
130
|
-
"print the version") do
|
131
|
-
options[:version] = true
|
132
|
-
stdout.puts show_version
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
if __FILE__ == $0
|
139
|
-
opts = {}
|
140
|
-
options ={}
|
141
|
-
[%w(--help), %w(--version)].each do |o|
|
142
|
-
options = Trepan::copy_default_options
|
143
|
-
opts = Trepan::setup_options(options)
|
144
|
-
rest = opts.parse o
|
145
|
-
p options
|
146
|
-
puts '=' * 10
|
147
|
-
end
|
148
|
-
rest = opts.parse! ARGV
|
149
|
-
puts opts
|
150
|
-
puts '=' * 10
|
151
|
-
p options
|
152
|
-
puts '=' * 10
|
153
|
-
p Trepan::DEFAULT_CMDLINE_SETTINGS
|
154
|
-
end
|
data/bin/trepan.orig
DELETED
File without changes
|
data/bin/trepan.rej
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
--- bin/trepan
|
2
|
-
+++ bin/trepan
|
3
|
-
@@ -56,7 +56,7 @@
|
4
|
-
# Set global so others may use this debugger.
|
5
|
-
|
6
|
-
opts = {}
|
7
|
-
- %w(cmdfiles initial_dir host nx port server terminal).each do |opt|
|
8
|
-
+ %w(cmdfiles initial_dir host nx port server highlight).each do |opt|
|
9
|
-
opts[opt.to_sym] = options[opt.to_sym]
|
10
|
-
end
|
11
|
-
|
data/lib/trepanning.rb.rej
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
--- lib/trepanning.rb
|
2
|
-
+++ lib/trepanning.rb
|
3
|
-
@@ -66,7 +66,7 @@
|
4
|
-
|
5
|
-
# FIXME: The below option settings is a big crock.
|
6
|
-
@settings[:core_opts][:cmdproc_opts] ||= {}
|
7
|
-
- @settings[:core_opts][:cmdproc_opts][:terminal] ||= settings[:terminal]
|
8
|
-
+ @settings[:core_opts][:cmdproc_opts][:highlight] ||= settings[:highlight]
|
9
|
-
|
10
|
-
@core = Core.new(self, @settings[:core_opts])
|
11
|
-
|
File without changes
|
@@ -1,11 +0,0 @@
|
|
1
|
-
--- sample/rocky-dot-trepanrc
|
2
|
-
+++ sample/rocky-dot-trepanrc
|
3
|
-
@@ -4,7 +4,7 @@
|
4
|
-
dir /home/rocky-rvm/.rvm/src/rbx-head/
|
5
|
-
|
6
|
-
set autoeval on # Is default, but just in case
|
7
|
-
-# set terminal on # turn on syntax highlight by default
|
8
|
-
+# set highlight on # turn on syntax highlight by default
|
9
|
-
|
10
|
-
# My customization to the default syntax coloring
|
11
|
-
load "#{ENV['HOME']}/.trepanx-colors.rb"
|