ruby-debug-ide22 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +75 -75
- data/ChangeLog.archive +1073 -1073
- data/ChangeLog.md +594 -594
- data/Gemfile +38 -38
- data/MIT-LICENSE +24 -24
- data/Rakefile +92 -92
- data/bin/gdb_wrapper +96 -96
- data/bin/rdebug-ide +200 -200
- data/ext/mkrf_conf.rb +44 -44
- data/lib/ruby-debug-ide/attach/debugger_loader.rb +20 -20
- data/lib/ruby-debug-ide/attach/gdb.rb +73 -73
- data/lib/ruby-debug-ide/attach/lldb.rb +71 -71
- data/lib/ruby-debug-ide/attach/native_debugger.rb +133 -133
- data/lib/ruby-debug-ide/attach/process_thread.rb +54 -54
- data/lib/ruby-debug-ide/attach/util.rb +114 -114
- data/lib/ruby-debug-ide/command.rb +187 -187
- data/lib/ruby-debug-ide/commands/breakpoints.rb +128 -128
- data/lib/ruby-debug-ide/commands/catchpoint.rb +64 -64
- data/lib/ruby-debug-ide/commands/condition.rb +51 -51
- data/lib/ruby-debug-ide/commands/control.rb +164 -158
- data/lib/ruby-debug-ide/commands/enable.rb +203 -203
- data/lib/ruby-debug-ide/commands/eval.rb +64 -64
- data/lib/ruby-debug-ide/commands/expression_info.rb +71 -71
- data/lib/ruby-debug-ide/commands/file_filtering.rb +106 -106
- data/lib/ruby-debug-ide/commands/frame.rb +155 -155
- data/lib/ruby-debug-ide/commands/inspect.rb +25 -25
- data/lib/ruby-debug-ide/commands/load.rb +17 -17
- data/lib/ruby-debug-ide/commands/stepping.rb +108 -108
- data/lib/ruby-debug-ide/commands/threads.rb +178 -178
- data/lib/ruby-debug-ide/commands/variables.rb +154 -154
- data/lib/ruby-debug-ide/event_processor.rb +71 -71
- data/lib/ruby-debug-ide/greeter.rb +42 -42
- data/lib/ruby-debug-ide/helper.rb +33 -33
- data/lib/ruby-debug-ide/ide_processor.rb +155 -155
- data/lib/ruby-debug-ide/interface.rb +47 -45
- data/lib/ruby-debug-ide/multiprocess/monkey.rb +46 -46
- data/lib/ruby-debug-ide/multiprocess/pre_child.rb +58 -58
- data/lib/ruby-debug-ide/multiprocess/starter.rb +10 -10
- data/lib/ruby-debug-ide/multiprocess/unmonkey.rb +30 -30
- data/lib/ruby-debug-ide/multiprocess.rb +22 -22
- data/lib/ruby-debug-ide/thread_alias.rb +26 -26
- data/lib/ruby-debug-ide/version.rb +3 -3
- data/lib/ruby-debug-ide/xml_printer.rb +570 -570
- data/lib/ruby-debug-ide.rb +230 -228
- data/ruby-debug-ide.gemspec +47 -47
- metadata +4 -4
data/bin/rdebug-ide
CHANGED
@@ -1,200 +1,200 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'rubygems'
|
3
|
-
require 'optparse'
|
4
|
-
require "ostruct"
|
5
|
-
if RUBY_VERSION < "1.9"
|
6
|
-
require 'ruby-debug-ide'
|
7
|
-
else
|
8
|
-
require_relative '../lib/ruby-debug-ide'
|
9
|
-
end
|
10
|
-
|
11
|
-
$stdout.sync=true
|
12
|
-
|
13
|
-
options = OpenStruct.new(
|
14
|
-
'frame_bind' => false,
|
15
|
-
'host' => nil,
|
16
|
-
'load_mode' => false,
|
17
|
-
'port' => 1234,
|
18
|
-
'stop' => false,
|
19
|
-
'tracing' => false,
|
20
|
-
'skip_wait_for_start' => false,
|
21
|
-
'keep_process_alive' => false,
|
22
|
-
'int_handler' => true,
|
23
|
-
'dispatcher_port' => -1,
|
24
|
-
'evaluation_timeout' => 10,
|
25
|
-
'trace_to_s' => false,
|
26
|
-
'debugger_memory_limit' => 10,
|
27
|
-
'inspect_time_limit' => 100,
|
28
|
-
'rm_protocol_extensions' => false,
|
29
|
-
'catchpoint_deleted_event' => false,
|
30
|
-
'value_as_nested_element' => false,
|
31
|
-
'attach_mode' => false,
|
32
|
-
'cli_debug' => false,
|
33
|
-
'key_value_mode' => false,
|
34
|
-
'socket_path' => nil
|
35
|
-
)
|
36
|
-
|
37
|
-
opts = OptionParser.new do |opts|
|
38
|
-
opts.banner = <<EOB
|
39
|
-
Using ruby-debug-base #{Debugger::VERSION}
|
40
|
-
Usage: rdebug-ide is supposed to be called from RDT, NetBeans, RubyMine, or
|
41
|
-
the IntelliJ IDEA Ruby plugin. The command line interface to
|
42
|
-
ruby-debug is rdebug.
|
43
|
-
EOB
|
44
|
-
opts.separator ""
|
45
|
-
opts.separator "Options:"
|
46
|
-
|
47
|
-
opts.on("-h", "--host HOST", "Host name used for remote debugging") {|host| options.host = host}
|
48
|
-
opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|port| options.port = port}
|
49
|
-
opts.on("--dispatcher-port PORT", Integer, "Port used for multi-process debugging dispatcher") do |dp|
|
50
|
-
options.dispatcher_port = dp
|
51
|
-
end
|
52
|
-
opts.on('--evaluation-timeout TIMEOUT', Integer,'evaluation timeout in seconds (default: 10)') do |timeout|
|
53
|
-
options.evaluation_timeout = timeout
|
54
|
-
end
|
55
|
-
opts.on("--evaluation-control", "trace to_s evaluation") {options.trace_to_s = true}
|
56
|
-
|
57
|
-
opts.on("-m", "--memory-limit LIMIT", Integer, "evaluation memory limit in mb (default: 10)") do |limit|
|
58
|
-
if defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0'
|
59
|
-
$stderr.puts "Evaluation memory limit is ineffective in JRuby and MRI < 2.0"
|
60
|
-
limit = 0
|
61
|
-
end
|
62
|
-
options.debugger_memory_limit = limit
|
63
|
-
options.trace_to_s ||= limit > 0
|
64
|
-
end
|
65
|
-
|
66
|
-
opts.on("-t", "--time-limit LIMIT", Integer, "evaluation time limit in milliseconds (default: 100)") do |limit|
|
67
|
-
options.inspect_time_limit = limit
|
68
|
-
options.trace_to_s ||= limit > 0
|
69
|
-
end
|
70
|
-
|
71
|
-
opts.on('--stop', 'stop when the script is loaded') {options.stop = true}
|
72
|
-
opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
|
73
|
-
opts.on("--skip_wait_for_start", "skip wait for 'start' command") {options.skip_wait_for_start = true}
|
74
|
-
opts.on("--keep-process-alive", "don't exit the process when debugger is exited") {options.keep_process_alive = true}
|
75
|
-
opts.on("-l", "--load-mode", "load mode (experimental)") {options.load_mode = true}
|
76
|
-
opts.on("-d", "--debug", "Debug self - prints information for debugging ruby-debug itself") do
|
77
|
-
Debugger.cli_debug = true
|
78
|
-
options.cli_debug = true
|
79
|
-
end
|
80
|
-
opts.on("--xml-debug", "Debug self - sends information <message>s for debugging ruby-debug itself") do
|
81
|
-
Debugger.xml_debug = true
|
82
|
-
end
|
83
|
-
opts.on("-I", "--include PATH", String, "Add PATH to $LOAD_PATH") do |path|
|
84
|
-
$LOAD_PATH.unshift(path)
|
85
|
-
end
|
86
|
-
opts.on("--attach-mode", "Tells that rdebug-ide is working in attach mode") do
|
87
|
-
options.attach_mode = true
|
88
|
-
end
|
89
|
-
opts.on("--key-value", "Key/Value presentation of hash items") do
|
90
|
-
options.key_value_mode = true
|
91
|
-
end
|
92
|
-
opts.on("--ignore-port", "Generate another port") do
|
93
|
-
options.ignore_port = true
|
94
|
-
end
|
95
|
-
opts.on("--keep-frame-binding", "Keep frame bindings") {options.frame_bind = true}
|
96
|
-
opts.on("--disable-int-handler", "Disables interrupt signal handler") {options.int_handler = false}
|
97
|
-
opts.on("--rubymine-protocol-extensions", "Enable all RubyMine-specific incompatible protocol extensions") do
|
98
|
-
options.rm_protocol_extensions = true
|
99
|
-
end
|
100
|
-
opts.on("--catchpoint-deleted-event", "Enable chatchpointDeleted event") do
|
101
|
-
options.catchpoint_deleted_event = true
|
102
|
-
end
|
103
|
-
opts.on("--value-as-nested-element", "Allow to pass variable's value as nested element instead of attribute") do
|
104
|
-
options.value_as_nested_element = true
|
105
|
-
end
|
106
|
-
opts.on("--socket-path PATH", "Listen for debugger on the given UNIX domain socket path") do |path|
|
107
|
-
options.socket_path = path
|
108
|
-
end
|
109
|
-
opts.separator ""
|
110
|
-
opts.separator "Common options:"
|
111
|
-
opts.on_tail("-v", "--version", "Show version") do
|
112
|
-
puts "Using ruby-debug-base #{Debugger::VERSION}"
|
113
|
-
exit
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
begin
|
118
|
-
Debugger::ARGV = ARGV.clone
|
119
|
-
rdebug_path = File.expand_path($0)
|
120
|
-
if RUBY_PLATFORM =~ /mswin/
|
121
|
-
rdebug_path += ".cmd" unless rdebug_path =~ /\.cmd$/i
|
122
|
-
end
|
123
|
-
Debugger::RDEBUG_SCRIPT = rdebug_path
|
124
|
-
opts.parse! ARGV
|
125
|
-
rescue StandardError => e
|
126
|
-
puts opts
|
127
|
-
puts
|
128
|
-
puts e.message
|
129
|
-
exit(1)
|
130
|
-
end
|
131
|
-
|
132
|
-
if ARGV.empty? && !options.attach_mode
|
133
|
-
puts opts
|
134
|
-
puts
|
135
|
-
puts "Must specify a script to run"
|
136
|
-
exit(1)
|
137
|
-
end
|
138
|
-
|
139
|
-
# save script name
|
140
|
-
if !options.attach_mode
|
141
|
-
Debugger::PROG_SCRIPT = ARGV.shift
|
142
|
-
else
|
143
|
-
Debugger::PROG_SCRIPT = $0
|
144
|
-
end
|
145
|
-
|
146
|
-
if options.dispatcher_port != -1
|
147
|
-
ENV['IDE_PROCESS_DISPATCHER'] = options.dispatcher_port.to_s
|
148
|
-
if RUBY_VERSION < "1.9"
|
149
|
-
lib_path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
|
150
|
-
$: << lib_path unless $:.include? lib_path
|
151
|
-
require 'ruby-debug-ide/multiprocess'
|
152
|
-
else
|
153
|
-
require_relative '../lib/ruby-debug-ide/multiprocess'
|
154
|
-
end
|
155
|
-
Debugger::MultiProcess.do_monkey
|
156
|
-
|
157
|
-
ENV['DEBUGGER_STORED_RUBYLIB'] = ENV['RUBYLIB']
|
158
|
-
old_opts = ENV['RUBYOPT'] || ''
|
159
|
-
starter = "-r#{File.expand_path(File.dirname(__FILE__))}/../lib/ruby-debug-ide/multiprocess/starter"
|
160
|
-
unless old_opts.include? starter
|
161
|
-
ENV['RUBYOPT'] = starter
|
162
|
-
ENV['RUBYOPT'] += " #{old_opts}" if old_opts != ''
|
163
|
-
end
|
164
|
-
ENV['DEBUGGER_CLI_DEBUG'] = Debugger.cli_debug.to_s
|
165
|
-
end
|
166
|
-
|
167
|
-
if options.int_handler
|
168
|
-
# install interruption handler
|
169
|
-
trap('INT') { Debugger.interrupt_last }
|
170
|
-
end
|
171
|
-
|
172
|
-
if options.keep_process_alive
|
173
|
-
ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] = "true"
|
174
|
-
end
|
175
|
-
|
176
|
-
# set options
|
177
|
-
Debugger.keep_frame_binding = options.frame_bind
|
178
|
-
Debugger.tracing = options.tracing
|
179
|
-
Debugger.evaluation_timeout = options.evaluation_timeout
|
180
|
-
Debugger.trace_to_s = options.trace_to_s && (options.debugger_memory_limit > 0 || options.inspect_time_limit > 0)
|
181
|
-
Debugger.debugger_memory_limit = options.debugger_memory_limit
|
182
|
-
Debugger.inspect_time_limit = options.inspect_time_limit
|
183
|
-
Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
|
184
|
-
Debugger.value_as_nested_element = options.value_as_nested_element || options.rm_protocol_extensions
|
185
|
-
Debugger.key_value_mode = options.key_value_mode
|
186
|
-
|
187
|
-
if options.attach_mode
|
188
|
-
if Debugger::FRONT_END == "debase"
|
189
|
-
Debugger.init_variables
|
190
|
-
end
|
191
|
-
|
192
|
-
Debugger::MultiProcess::pre_child(options)
|
193
|
-
|
194
|
-
if Debugger::FRONT_END == "debase"
|
195
|
-
Debugger.setup_tracepoints
|
196
|
-
Debugger.prepare_context
|
197
|
-
end
|
198
|
-
else
|
199
|
-
Debugger.debug_program(options)
|
200
|
-
end
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'optparse'
|
4
|
+
require "ostruct"
|
5
|
+
if RUBY_VERSION < "1.9"
|
6
|
+
require 'ruby-debug-ide'
|
7
|
+
else
|
8
|
+
require_relative '../lib/ruby-debug-ide'
|
9
|
+
end
|
10
|
+
|
11
|
+
$stdout.sync=true
|
12
|
+
|
13
|
+
options = OpenStruct.new(
|
14
|
+
'frame_bind' => false,
|
15
|
+
'host' => nil,
|
16
|
+
'load_mode' => false,
|
17
|
+
'port' => 1234,
|
18
|
+
'stop' => false,
|
19
|
+
'tracing' => false,
|
20
|
+
'skip_wait_for_start' => false,
|
21
|
+
'keep_process_alive' => false,
|
22
|
+
'int_handler' => true,
|
23
|
+
'dispatcher_port' => -1,
|
24
|
+
'evaluation_timeout' => 10,
|
25
|
+
'trace_to_s' => false,
|
26
|
+
'debugger_memory_limit' => 10,
|
27
|
+
'inspect_time_limit' => 100,
|
28
|
+
'rm_protocol_extensions' => false,
|
29
|
+
'catchpoint_deleted_event' => false,
|
30
|
+
'value_as_nested_element' => false,
|
31
|
+
'attach_mode' => false,
|
32
|
+
'cli_debug' => false,
|
33
|
+
'key_value_mode' => false,
|
34
|
+
'socket_path' => nil
|
35
|
+
)
|
36
|
+
|
37
|
+
opts = OptionParser.new do |opts|
|
38
|
+
opts.banner = <<EOB
|
39
|
+
Using ruby-debug-base #{Debugger::VERSION}
|
40
|
+
Usage: rdebug-ide is supposed to be called from RDT, NetBeans, RubyMine, or
|
41
|
+
the IntelliJ IDEA Ruby plugin. The command line interface to
|
42
|
+
ruby-debug is rdebug.
|
43
|
+
EOB
|
44
|
+
opts.separator ""
|
45
|
+
opts.separator "Options:"
|
46
|
+
|
47
|
+
opts.on("-h", "--host HOST", "Host name used for remote debugging") {|host| options.host = host}
|
48
|
+
opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|port| options.port = port}
|
49
|
+
opts.on("--dispatcher-port PORT", Integer, "Port used for multi-process debugging dispatcher") do |dp|
|
50
|
+
options.dispatcher_port = dp
|
51
|
+
end
|
52
|
+
opts.on('--evaluation-timeout TIMEOUT', Integer,'evaluation timeout in seconds (default: 10)') do |timeout|
|
53
|
+
options.evaluation_timeout = timeout
|
54
|
+
end
|
55
|
+
opts.on("--evaluation-control", "trace to_s evaluation") {options.trace_to_s = true}
|
56
|
+
|
57
|
+
opts.on("-m", "--memory-limit LIMIT", Integer, "evaluation memory limit in mb (default: 10)") do |limit|
|
58
|
+
if defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0'
|
59
|
+
$stderr.puts "Evaluation memory limit is ineffective in JRuby and MRI < 2.0"
|
60
|
+
limit = 0
|
61
|
+
end
|
62
|
+
options.debugger_memory_limit = limit
|
63
|
+
options.trace_to_s ||= limit > 0
|
64
|
+
end
|
65
|
+
|
66
|
+
opts.on("-t", "--time-limit LIMIT", Integer, "evaluation time limit in milliseconds (default: 100)") do |limit|
|
67
|
+
options.inspect_time_limit = limit
|
68
|
+
options.trace_to_s ||= limit > 0
|
69
|
+
end
|
70
|
+
|
71
|
+
opts.on('--stop', 'stop when the script is loaded') {options.stop = true}
|
72
|
+
opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
|
73
|
+
opts.on("--skip_wait_for_start", "skip wait for 'start' command") {options.skip_wait_for_start = true}
|
74
|
+
opts.on("--keep-process-alive", "don't exit the process when debugger is exited") {options.keep_process_alive = true}
|
75
|
+
opts.on("-l", "--load-mode", "load mode (experimental)") {options.load_mode = true}
|
76
|
+
opts.on("-d", "--debug", "Debug self - prints information for debugging ruby-debug itself") do
|
77
|
+
Debugger.cli_debug = true
|
78
|
+
options.cli_debug = true
|
79
|
+
end
|
80
|
+
opts.on("--xml-debug", "Debug self - sends information <message>s for debugging ruby-debug itself") do
|
81
|
+
Debugger.xml_debug = true
|
82
|
+
end
|
83
|
+
opts.on("-I", "--include PATH", String, "Add PATH to $LOAD_PATH") do |path|
|
84
|
+
$LOAD_PATH.unshift(path)
|
85
|
+
end
|
86
|
+
opts.on("--attach-mode", "Tells that rdebug-ide is working in attach mode") do
|
87
|
+
options.attach_mode = true
|
88
|
+
end
|
89
|
+
opts.on("--key-value", "Key/Value presentation of hash items") do
|
90
|
+
options.key_value_mode = true
|
91
|
+
end
|
92
|
+
opts.on("--ignore-port", "Generate another port") do
|
93
|
+
options.ignore_port = true
|
94
|
+
end
|
95
|
+
opts.on("--keep-frame-binding", "Keep frame bindings") {options.frame_bind = true}
|
96
|
+
opts.on("--disable-int-handler", "Disables interrupt signal handler") {options.int_handler = false}
|
97
|
+
opts.on("--rubymine-protocol-extensions", "Enable all RubyMine-specific incompatible protocol extensions") do
|
98
|
+
options.rm_protocol_extensions = true
|
99
|
+
end
|
100
|
+
opts.on("--catchpoint-deleted-event", "Enable chatchpointDeleted event") do
|
101
|
+
options.catchpoint_deleted_event = true
|
102
|
+
end
|
103
|
+
opts.on("--value-as-nested-element", "Allow to pass variable's value as nested element instead of attribute") do
|
104
|
+
options.value_as_nested_element = true
|
105
|
+
end
|
106
|
+
opts.on("--socket-path PATH", "Listen for debugger on the given UNIX domain socket path") do |path|
|
107
|
+
options.socket_path = path
|
108
|
+
end
|
109
|
+
opts.separator ""
|
110
|
+
opts.separator "Common options:"
|
111
|
+
opts.on_tail("-v", "--version", "Show version") do
|
112
|
+
puts "Using ruby-debug-base #{Debugger::VERSION}"
|
113
|
+
exit
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
begin
|
118
|
+
Debugger::ARGV = ARGV.clone
|
119
|
+
rdebug_path = File.expand_path($0)
|
120
|
+
if RUBY_PLATFORM =~ /mswin/
|
121
|
+
rdebug_path += ".cmd" unless rdebug_path =~ /\.cmd$/i
|
122
|
+
end
|
123
|
+
Debugger::RDEBUG_SCRIPT = rdebug_path
|
124
|
+
opts.parse! ARGV
|
125
|
+
rescue StandardError => e
|
126
|
+
puts opts
|
127
|
+
puts
|
128
|
+
puts e.message
|
129
|
+
exit(1)
|
130
|
+
end
|
131
|
+
|
132
|
+
if ARGV.empty? && !options.attach_mode
|
133
|
+
puts opts
|
134
|
+
puts
|
135
|
+
puts "Must specify a script to run"
|
136
|
+
exit(1)
|
137
|
+
end
|
138
|
+
|
139
|
+
# save script name
|
140
|
+
if !options.attach_mode
|
141
|
+
Debugger::PROG_SCRIPT = ARGV.shift
|
142
|
+
else
|
143
|
+
Debugger::PROG_SCRIPT = $0
|
144
|
+
end
|
145
|
+
|
146
|
+
if options.dispatcher_port != -1
|
147
|
+
ENV['IDE_PROCESS_DISPATCHER'] = options.dispatcher_port.to_s
|
148
|
+
if RUBY_VERSION < "1.9"
|
149
|
+
lib_path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
|
150
|
+
$: << lib_path unless $:.include? lib_path
|
151
|
+
require 'ruby-debug-ide/multiprocess'
|
152
|
+
else
|
153
|
+
require_relative '../lib/ruby-debug-ide/multiprocess'
|
154
|
+
end
|
155
|
+
Debugger::MultiProcess.do_monkey
|
156
|
+
|
157
|
+
ENV['DEBUGGER_STORED_RUBYLIB'] = ENV['RUBYLIB']
|
158
|
+
old_opts = ENV['RUBYOPT'] || ''
|
159
|
+
starter = "-r#{File.expand_path(File.dirname(__FILE__))}/../lib/ruby-debug-ide/multiprocess/starter"
|
160
|
+
unless old_opts.include? starter
|
161
|
+
ENV['RUBYOPT'] = starter
|
162
|
+
ENV['RUBYOPT'] += " #{old_opts}" if old_opts != ''
|
163
|
+
end
|
164
|
+
ENV['DEBUGGER_CLI_DEBUG'] = Debugger.cli_debug.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
if options.int_handler
|
168
|
+
# install interruption handler
|
169
|
+
trap('INT') { Debugger.interrupt_last }
|
170
|
+
end
|
171
|
+
|
172
|
+
if options.keep_process_alive
|
173
|
+
ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] = "true"
|
174
|
+
end
|
175
|
+
|
176
|
+
# set options
|
177
|
+
Debugger.keep_frame_binding = options.frame_bind
|
178
|
+
Debugger.tracing = options.tracing
|
179
|
+
Debugger.evaluation_timeout = options.evaluation_timeout
|
180
|
+
Debugger.trace_to_s = options.trace_to_s && (options.debugger_memory_limit > 0 || options.inspect_time_limit > 0)
|
181
|
+
Debugger.debugger_memory_limit = options.debugger_memory_limit
|
182
|
+
Debugger.inspect_time_limit = options.inspect_time_limit
|
183
|
+
Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
|
184
|
+
Debugger.value_as_nested_element = options.value_as_nested_element || options.rm_protocol_extensions
|
185
|
+
Debugger.key_value_mode = options.key_value_mode
|
186
|
+
|
187
|
+
if options.attach_mode
|
188
|
+
if Debugger::FRONT_END == "debase"
|
189
|
+
Debugger.init_variables
|
190
|
+
end
|
191
|
+
|
192
|
+
Debugger::MultiProcess::pre_child(options)
|
193
|
+
|
194
|
+
if Debugger::FRONT_END == "debase"
|
195
|
+
Debugger.setup_tracepoints
|
196
|
+
Debugger.prepare_context
|
197
|
+
end
|
198
|
+
else
|
199
|
+
Debugger.debug_program(options)
|
200
|
+
end
|
data/ext/mkrf_conf.rb
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
install_dir = File.expand_path("../../../..", __FILE__)
|
2
|
-
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
3
|
-
rbx = defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE
|
4
|
-
|
5
|
-
unless jruby || rbx
|
6
|
-
require 'rubygems'
|
7
|
-
require 'rubygems/command.rb'
|
8
|
-
require 'rubygems/dependency.rb'
|
9
|
-
require 'rubygems/dependency_installer.rb'
|
10
|
-
|
11
|
-
begin
|
12
|
-
Gem::Command.build_args = ARGV
|
13
|
-
rescue NoMethodError
|
14
|
-
end
|
15
|
-
|
16
|
-
if RUBY_VERSION < "1.9"
|
17
|
-
dep = Gem::Dependency.new("ruby-debug-base", '>=0.10.4')
|
18
|
-
elsif RUBY_VERSION < '2.0'
|
19
|
-
dep = Gem::Dependency.new("ruby-debug-base19x", '>=0.11.30.pre15')
|
20
|
-
else
|
21
|
-
dep = Gem::Dependency.new("debase", '> 0')
|
22
|
-
end
|
23
|
-
|
24
|
-
begin
|
25
|
-
puts "Installing base gem"
|
26
|
-
inst = Gem::DependencyInstaller.new(:prerelease => dep.prerelease?, :install_dir => install_dir)
|
27
|
-
inst.install dep
|
28
|
-
rescue
|
29
|
-
begin
|
30
|
-
inst = Gem::DependencyInstaller.new(:prerelease => true, :install_dir => install_dir)
|
31
|
-
inst.install dep
|
32
|
-
rescue Exception => e
|
33
|
-
puts e
|
34
|
-
puts e.backtrace.join "\n "
|
35
|
-
exit(1)
|
36
|
-
end
|
37
|
-
end unless dep.nil? || dep.matching_specs.any?
|
38
|
-
end
|
39
|
-
|
40
|
-
# create dummy rakefile to indicate success
|
41
|
-
f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w")
|
42
|
-
f.write("task :default\n")
|
43
|
-
f.close
|
44
|
-
|
1
|
+
install_dir = File.expand_path("../../../..", __FILE__)
|
2
|
+
jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
3
|
+
rbx = defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE
|
4
|
+
|
5
|
+
unless jruby || rbx
|
6
|
+
require 'rubygems'
|
7
|
+
require 'rubygems/command.rb'
|
8
|
+
require 'rubygems/dependency.rb'
|
9
|
+
require 'rubygems/dependency_installer.rb'
|
10
|
+
|
11
|
+
begin
|
12
|
+
Gem::Command.build_args = ARGV
|
13
|
+
rescue NoMethodError
|
14
|
+
end
|
15
|
+
|
16
|
+
if RUBY_VERSION < "1.9"
|
17
|
+
dep = Gem::Dependency.new("ruby-debug-base", '>=0.10.4')
|
18
|
+
elsif RUBY_VERSION < '2.0'
|
19
|
+
dep = Gem::Dependency.new("ruby-debug-base19x", '>=0.11.30.pre15')
|
20
|
+
else
|
21
|
+
dep = Gem::Dependency.new("debase", '> 0')
|
22
|
+
end
|
23
|
+
|
24
|
+
begin
|
25
|
+
puts "Installing base gem"
|
26
|
+
inst = Gem::DependencyInstaller.new(:prerelease => dep.prerelease?, :install_dir => install_dir)
|
27
|
+
inst.install dep
|
28
|
+
rescue
|
29
|
+
begin
|
30
|
+
inst = Gem::DependencyInstaller.new(:prerelease => true, :install_dir => install_dir)
|
31
|
+
inst.install dep
|
32
|
+
rescue Exception => e
|
33
|
+
puts e
|
34
|
+
puts e.backtrace.join "\n "
|
35
|
+
exit(1)
|
36
|
+
end
|
37
|
+
end unless dep.nil? || dep.matching_specs.any?
|
38
|
+
end
|
39
|
+
|
40
|
+
# create dummy rakefile to indicate success
|
41
|
+
f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w")
|
42
|
+
f.write("task :default\n")
|
43
|
+
f.close
|
44
|
+
|
@@ -1,20 +1,20 @@
|
|
1
|
-
def load_debugger(gems_to_include, new_argv)
|
2
|
-
path_to_rdebug = File.expand_path(File.dirname(__FILE__)) + '/../../../bin/rdebug-ide'
|
3
|
-
|
4
|
-
old_argv = ARGV.clone
|
5
|
-
ARGV.clear
|
6
|
-
new_argv.each do |x|
|
7
|
-
ARGV << x
|
8
|
-
end
|
9
|
-
|
10
|
-
gems_to_include.each do |gem_path|
|
11
|
-
$LOAD_PATH.unshift(gem_path) unless $LOAD_PATH.include?(gem_path)
|
12
|
-
end
|
13
|
-
|
14
|
-
load path_to_rdebug
|
15
|
-
|
16
|
-
ARGV.clear
|
17
|
-
old_argv.each do |x|
|
18
|
-
ARGV << x
|
19
|
-
end
|
20
|
-
end
|
1
|
+
def load_debugger(gems_to_include, new_argv)
|
2
|
+
path_to_rdebug = File.expand_path(File.dirname(__FILE__)) + '/../../../bin/rdebug-ide'
|
3
|
+
|
4
|
+
old_argv = ARGV.clone
|
5
|
+
ARGV.clear
|
6
|
+
new_argv.each do |x|
|
7
|
+
ARGV << x
|
8
|
+
end
|
9
|
+
|
10
|
+
gems_to_include.each do |gem_path|
|
11
|
+
$LOAD_PATH.unshift(gem_path) unless $LOAD_PATH.include?(gem_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
load path_to_rdebug
|
15
|
+
|
16
|
+
ARGV.clear
|
17
|
+
old_argv.each do |x|
|
18
|
+
ARGV << x
|
19
|
+
end
|
20
|
+
end
|