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