ruby-debug-ide22 0.7.4 → 0.7.5
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.
- 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
@@ -1,158 +1,164 @@
|
|
1
|
-
module Debugger
|
2
|
-
class QuitCommand < Command # :nodoc:
|
3
|
-
self.control = true
|
4
|
-
|
5
|
-
def regexp
|
6
|
-
/^\s*(?:q(?:uit)?|exit)\s*$/
|
7
|
-
end
|
8
|
-
|
9
|
-
def execute
|
10
|
-
begin
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
end
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
end
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
end
|
156
|
-
|
157
|
-
|
158
|
-
|
1
|
+
module Debugger
|
2
|
+
class QuitCommand < Command # :nodoc:
|
3
|
+
self.control = true
|
4
|
+
|
5
|
+
def regexp
|
6
|
+
/^\s*(?:q(?:uit)?|exit)\s*$/
|
7
|
+
end
|
8
|
+
|
9
|
+
def execute
|
10
|
+
begin
|
11
|
+
if ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] == "true"
|
12
|
+
@delegate_sd_obj.interface.closing = true
|
13
|
+
Debugger.breakpoints.clear
|
14
|
+
@delegate_sd_obj.interface.command_queue << 'c'
|
15
|
+
else
|
16
|
+
@printer.print_msg("finished")
|
17
|
+
@printer.print_debug("Exiting debugger.")
|
18
|
+
end
|
19
|
+
ensure
|
20
|
+
exit! unless ENV['DEBUGGER_KEEP_PROCESS_ALIVE'] == "true" # exit -> exit!: No graceful way to stop threads...
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class << self
|
25
|
+
def help_command
|
26
|
+
%w[quit exit]
|
27
|
+
end
|
28
|
+
|
29
|
+
def help(cmd)
|
30
|
+
%{
|
31
|
+
q[uit]\texit from debugger,
|
32
|
+
exit\talias to quit
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class RestartCommand < Command # :nodoc:
|
39
|
+
self.control = true
|
40
|
+
|
41
|
+
def regexp
|
42
|
+
/ ^\s*
|
43
|
+
(restart|R)
|
44
|
+
(\s+ \S+ .*)?
|
45
|
+
$
|
46
|
+
/x
|
47
|
+
end
|
48
|
+
|
49
|
+
def execute
|
50
|
+
if not defined? Debugger::RDEBUG_SCRIPT or not defined? Debugger::ARGV
|
51
|
+
print "We are not in a context we can restart from.\n"
|
52
|
+
return
|
53
|
+
end
|
54
|
+
if @match[2]
|
55
|
+
args = Debugger::PROG_SCRIPT + " " + @match[2]
|
56
|
+
else
|
57
|
+
args = Debugger::ARGV.join(" ")
|
58
|
+
end
|
59
|
+
|
60
|
+
# An execv would be preferable to the "exec" below.
|
61
|
+
cmd = Debugger::RDEBUG_SCRIPT + " " + args
|
62
|
+
print "Re exec'ing:\n\t#{cmd}\n"
|
63
|
+
exec cmd
|
64
|
+
end
|
65
|
+
|
66
|
+
class << self
|
67
|
+
def help_command
|
68
|
+
'restart'
|
69
|
+
end
|
70
|
+
|
71
|
+
def help(cmd)
|
72
|
+
%{
|
73
|
+
restart|R [args]
|
74
|
+
Restart the program. This is is a re-exec - all debugger state
|
75
|
+
is lost. If command arguments are passed those are used.
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
class StartCommand < Command # :nodoc:
|
82
|
+
self.control = true
|
83
|
+
|
84
|
+
def regexp
|
85
|
+
/^\s*(start)(\s+ \S+ .*)?$/x
|
86
|
+
end
|
87
|
+
|
88
|
+
def execute
|
89
|
+
@printer.print_debug("Starting: running program script")
|
90
|
+
Debugger.run_prog_script #Debugger.prog_script_running?
|
91
|
+
end
|
92
|
+
|
93
|
+
class << self
|
94
|
+
def help_command
|
95
|
+
'start'
|
96
|
+
end
|
97
|
+
|
98
|
+
def help(cmd)
|
99
|
+
%{
|
100
|
+
run prog script
|
101
|
+
}
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
class InterruptCommand < Command # :nodoc:
|
108
|
+
self.event = false
|
109
|
+
self.control = true
|
110
|
+
self.need_context = true
|
111
|
+
|
112
|
+
def regexp
|
113
|
+
/^\s*i(?:nterrupt)?\s*$/
|
114
|
+
end
|
115
|
+
|
116
|
+
def execute
|
117
|
+
unless Debugger.interrupt_last
|
118
|
+
context = Debugger.thread_context(Thread.main)
|
119
|
+
context.interrupt
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class << self
|
124
|
+
def help_command
|
125
|
+
'interrupt'
|
126
|
+
end
|
127
|
+
|
128
|
+
def help(cmd)
|
129
|
+
%{
|
130
|
+
i[nterrupt]\tinterrupt the program
|
131
|
+
}
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
class DetachCommand < Command # :nodoc:
|
138
|
+
self.control = true
|
139
|
+
|
140
|
+
def regexp
|
141
|
+
/^\s*detach\s*$/
|
142
|
+
end
|
143
|
+
|
144
|
+
def execute
|
145
|
+
Debugger.stop
|
146
|
+
Debugger.interface.close
|
147
|
+
Debugger::MultiProcess.undo_monkey
|
148
|
+
Debugger.control_thread = nil
|
149
|
+
Thread.current.exit #@control_thread is a current thread
|
150
|
+
end
|
151
|
+
|
152
|
+
class << self
|
153
|
+
def help_command
|
154
|
+
'detach'
|
155
|
+
end
|
156
|
+
|
157
|
+
def help(cmd)
|
158
|
+
%{
|
159
|
+
detach\ndetach debugger\nnote: this option is only for remote debugging (or local attach)
|
160
|
+
}
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|