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,108 +1,108 @@
1
- module Debugger
2
- class NextCommand < Command # :nodoc:
3
- self.need_context = true
4
-
5
- def regexp
6
- /^\s*n(?:ext)?([+-])?(?:\s+(\d+))?$/
7
- end
8
-
9
- def execute
10
- force = @match[1] == '+'
11
- steps = @match[2] ? @match[2].to_i : 1
12
- @state.context.step_over steps, @state.frame_pos, force
13
- @state.proceed
14
- end
15
-
16
- class << self
17
- def help_command
18
- 'next'
19
- end
20
-
21
- def help(cmd)
22
- %{
23
- n[ext][+][ nnn]\tstep over once or nnn times,
24
- \t\t'+' forces to move to another line
25
- }
26
- end
27
- end
28
- end
29
-
30
- class StepCommand < Command # :nodoc:
31
- self.need_context = true
32
-
33
- def regexp
34
- /^\s*s(?:tep)?([+-])?(?:\s+(\d+))?$/
35
- end
36
-
37
- def execute
38
- force = @match[1] == '+'
39
- steps = @match[2] ? @match[2].to_i : 1
40
- @state.context.step(steps, force)
41
- @state.proceed
42
- end
43
-
44
- class << self
45
- def help_command
46
- 'step'
47
- end
48
-
49
- def help(cmd)
50
- %{
51
- s[tep][ nnn]\tstep (into methods) once or nnn times
52
- }
53
- end
54
- end
55
- end
56
-
57
- class FinishCommand < Command # :nodoc:
58
- self.need_context = true
59
-
60
- def regexp
61
- /^\s*fin(?:ish)?$/
62
- end
63
-
64
- def execute
65
- if @state.frame_pos == @state.context.stack_size - 1
66
- print_msg "\"finish\" not meaningful in the outermost frame."
67
- else
68
- @state.context.stop_frame = @state.frame_pos
69
- @state.frame_pos = 0
70
- @state.proceed
71
- end
72
- end
73
-
74
- class << self
75
- def help_command
76
- 'finish'
77
- end
78
-
79
- def help(cmd)
80
- %{
81
- fin[ish]\treturn to outer frame
82
- }
83
- end
84
- end
85
- end
86
-
87
- class ContinueCommand < Command # :nodoc:
88
- def regexp
89
- /^\s*c(?:ont)?$/
90
- end
91
-
92
- def execute
93
- @state.proceed
94
- end
95
-
96
- class << self
97
- def help_command
98
- 'cont'
99
- end
100
-
101
- def help(cmd)
102
- %{
103
- c[ont]\trun until program ends or hit breakpoint
104
- }
105
- end
106
- end
107
- end
108
- end
1
+ module Debugger
2
+ class NextCommand < Command # :nodoc:
3
+ self.need_context = true
4
+
5
+ def regexp
6
+ /^\s*n(?:ext)?([+-])?(?:\s+(\d+))?$/
7
+ end
8
+
9
+ def execute
10
+ force = @match[1] == '+'
11
+ steps = @match[2] ? @match[2].to_i : 1
12
+ @state.context.step_over steps, @state.frame_pos, force
13
+ @state.proceed
14
+ end
15
+
16
+ class << self
17
+ def help_command
18
+ 'next'
19
+ end
20
+
21
+ def help(cmd)
22
+ %{
23
+ n[ext][+][ nnn]\tstep over once or nnn times,
24
+ \t\t'+' forces to move to another line
25
+ }
26
+ end
27
+ end
28
+ end
29
+
30
+ class StepCommand < Command # :nodoc:
31
+ self.need_context = true
32
+
33
+ def regexp
34
+ /^\s*s(?:tep)?([+-])?(?:\s+(\d+))?$/
35
+ end
36
+
37
+ def execute
38
+ force = @match[1] == '+'
39
+ steps = @match[2] ? @match[2].to_i : 1
40
+ @state.context.step(steps, force)
41
+ @state.proceed
42
+ end
43
+
44
+ class << self
45
+ def help_command
46
+ 'step'
47
+ end
48
+
49
+ def help(cmd)
50
+ %{
51
+ s[tep][ nnn]\tstep (into methods) once or nnn times
52
+ }
53
+ end
54
+ end
55
+ end
56
+
57
+ class FinishCommand < Command # :nodoc:
58
+ self.need_context = true
59
+
60
+ def regexp
61
+ /^\s*fin(?:ish)?$/
62
+ end
63
+
64
+ def execute
65
+ if @state.frame_pos == @state.context.stack_size - 1
66
+ print_msg "\"finish\" not meaningful in the outermost frame."
67
+ else
68
+ @state.context.stop_frame = @state.frame_pos
69
+ @state.frame_pos = 0
70
+ @state.proceed
71
+ end
72
+ end
73
+
74
+ class << self
75
+ def help_command
76
+ 'finish'
77
+ end
78
+
79
+ def help(cmd)
80
+ %{
81
+ fin[ish]\treturn to outer frame
82
+ }
83
+ end
84
+ end
85
+ end
86
+
87
+ class ContinueCommand < Command # :nodoc:
88
+ def regexp
89
+ /^\s*c(?:ont)?$/
90
+ end
91
+
92
+ def execute
93
+ @state.proceed
94
+ end
95
+
96
+ class << self
97
+ def help_command
98
+ 'cont'
99
+ end
100
+
101
+ def help(cmd)
102
+ %{
103
+ c[ont]\trun until program ends or hit breakpoint
104
+ }
105
+ end
106
+ end
107
+ end
108
+ end
@@ -1,178 +1,178 @@
1
- module Debugger
2
- class ThreadListCommand < Command # :nodoc:
3
- self.control = true
4
- def regexp
5
- /^\s*th(?:read)?\s+l(?:ist)?\s*$/
6
- end
7
-
8
- def execute
9
- contexts = Debugger.contexts.sort_by{|c| c.thnum}
10
- print_contexts(contexts)
11
- end
12
-
13
- class << self
14
- def help_command
15
- 'thread'
16
- end
17
-
18
- def help(cmd)
19
- %{
20
- th[read] l[ist]\t\t\tlist all threads
21
- }
22
- end
23
- end
24
- end
25
-
26
- class ThreadSwitchCommand < Command # :nodoc:
27
- self.control = true
28
- self.need_context = true
29
-
30
- def regexp
31
- /^\s*th(?:read)?\s+(?:sw(?:itch)?\s+)?(\d+)\s*$/
32
- end
33
-
34
- def execute
35
- c = get_context(@match[1].to_i)
36
- case
37
- when c == @state.context
38
- print_msg "It's the current thread."
39
- when c.ignored?
40
- print_msg "Can't switch to the debugger thread."
41
- else
42
- print_context(c)
43
- c.stop_next = 1
44
- c.thread.run
45
- @state.proceed
46
- end
47
- end
48
-
49
- class << self
50
- def help_command
51
- 'thread'
52
- end
53
-
54
- def help(cmd)
55
- %{
56
- th[read] [sw[itch]] <nnn>\tswitch thread context to nnn
57
- }
58
- end
59
- end
60
- end
61
-
62
- class ThreadInspectCommand < Command # :nodoc:
63
- self.control = true
64
- self.need_context = true
65
-
66
- def regexp
67
- /^\s*th(?:read)?\s+in(?:spect)?\s+(\d+)\s*$/
68
- end
69
-
70
- def execute
71
- @state.context = get_context(@match[1].to_i)
72
- end
73
-
74
- class << self
75
- def help_command
76
- 'thread'
77
- end
78
-
79
- def help(cmd)
80
- %{
81
- th[read] in[spect] <nnn>\tswitch thread context to nnn but don't resume any threads
82
- }
83
- end
84
- end
85
- end
86
-
87
- class ThreadStopCommand < Command # :nodoc:
88
- self.control = true
89
- self.need_context = true
90
-
91
- def regexp
92
- /^\s*th(?:read)?\s+stop\s+(\d+)\s*$/
93
- end
94
-
95
- def execute
96
- c = get_context(@match[1].to_i)
97
- case
98
- when c == @state.context
99
- print_msg "It's the current thread."
100
- when c.ignored?
101
- print_msg "Can't stop the debugger thread."
102
- else
103
- c.suspend
104
- print_context(c)
105
- end
106
- end
107
-
108
- class << self
109
- def help_command
110
- 'thread'
111
- end
112
-
113
- def help(cmd)
114
- %{
115
- th[read] stop <nnn>\t\tstop thread nnn
116
- }
117
- end
118
- end
119
- end
120
-
121
- class ThreadCurrentCommand < Command # :nodoc:
122
- self.need_context = true
123
-
124
- def regexp
125
- /^\s*th(?:read)?\s+c(?:ur(?:rent)?)?\s*$/
126
- end
127
-
128
- def execute
129
- print_context(@state.context)
130
- end
131
-
132
- class << self
133
- def help_command
134
- 'thread'
135
- end
136
-
137
- def help(cmd)
138
- %{
139
- th[read] c[ur[rent]]\t\tshow current thread
140
- }
141
- end
142
- end
143
- end
144
-
145
- class ThreadResumeCommand < Command # :nodoc:
146
- self.control = true
147
- self.need_context = true
148
-
149
- def regexp
150
- /^\s*th(?:read)?\s+resume\s+(\d+)\s*$/
151
- end
152
-
153
- def execute
154
- c = get_context(@match[1].to_i)
155
- case
156
- when c == @state.context
157
- print_msg "It's the current thread."
158
- when c.ignored?
159
- print_msg "Can't resume the debugger thread."
160
- else
161
- c.resume
162
- print_context(c)
163
- end
164
- end
165
-
166
- class << self
167
- def help_command
168
- 'thread'
169
- end
170
-
171
- def help(cmd)
172
- %{
173
- th[read] resume <nnn>\t\tresume thread nnn
174
- }
175
- end
176
- end
177
- end
178
- end
1
+ module Debugger
2
+ class ThreadListCommand < Command # :nodoc:
3
+ self.control = true
4
+ def regexp
5
+ /^\s*th(?:read)?\s+l(?:ist)?\s*$/
6
+ end
7
+
8
+ def execute
9
+ contexts = Debugger.contexts.sort_by{|c| c.thnum}
10
+ print_contexts(contexts)
11
+ end
12
+
13
+ class << self
14
+ def help_command
15
+ 'thread'
16
+ end
17
+
18
+ def help(cmd)
19
+ %{
20
+ th[read] l[ist]\t\t\tlist all threads
21
+ }
22
+ end
23
+ end
24
+ end
25
+
26
+ class ThreadSwitchCommand < Command # :nodoc:
27
+ self.control = true
28
+ self.need_context = true
29
+
30
+ def regexp
31
+ /^\s*th(?:read)?\s+(?:sw(?:itch)?\s+)?(\d+)\s*$/
32
+ end
33
+
34
+ def execute
35
+ c = get_context(@match[1].to_i)
36
+ case
37
+ when c == @state.context
38
+ print_msg "It's the current thread."
39
+ when c.ignored?
40
+ print_msg "Can't switch to the debugger thread."
41
+ else
42
+ print_context(c)
43
+ c.stop_next = 1
44
+ c.thread.run
45
+ @state.proceed
46
+ end
47
+ end
48
+
49
+ class << self
50
+ def help_command
51
+ 'thread'
52
+ end
53
+
54
+ def help(cmd)
55
+ %{
56
+ th[read] [sw[itch]] <nnn>\tswitch thread context to nnn
57
+ }
58
+ end
59
+ end
60
+ end
61
+
62
+ class ThreadInspectCommand < Command # :nodoc:
63
+ self.control = true
64
+ self.need_context = true
65
+
66
+ def regexp
67
+ /^\s*th(?:read)?\s+in(?:spect)?\s+(\d+)\s*$/
68
+ end
69
+
70
+ def execute
71
+ @state.context = get_context(@match[1].to_i)
72
+ end
73
+
74
+ class << self
75
+ def help_command
76
+ 'thread'
77
+ end
78
+
79
+ def help(cmd)
80
+ %{
81
+ th[read] in[spect] <nnn>\tswitch thread context to nnn but don't resume any threads
82
+ }
83
+ end
84
+ end
85
+ end
86
+
87
+ class ThreadStopCommand < Command # :nodoc:
88
+ self.control = true
89
+ self.need_context = true
90
+
91
+ def regexp
92
+ /^\s*th(?:read)?\s+stop\s+(\d+)\s*$/
93
+ end
94
+
95
+ def execute
96
+ c = get_context(@match[1].to_i)
97
+ case
98
+ when c == @state.context
99
+ print_msg "It's the current thread."
100
+ when c.ignored?
101
+ print_msg "Can't stop the debugger thread."
102
+ else
103
+ c.suspend
104
+ print_context(c)
105
+ end
106
+ end
107
+
108
+ class << self
109
+ def help_command
110
+ 'thread'
111
+ end
112
+
113
+ def help(cmd)
114
+ %{
115
+ th[read] stop <nnn>\t\tstop thread nnn
116
+ }
117
+ end
118
+ end
119
+ end
120
+
121
+ class ThreadCurrentCommand < Command # :nodoc:
122
+ self.need_context = true
123
+
124
+ def regexp
125
+ /^\s*th(?:read)?\s+c(?:ur(?:rent)?)?\s*$/
126
+ end
127
+
128
+ def execute
129
+ print_context(@state.context)
130
+ end
131
+
132
+ class << self
133
+ def help_command
134
+ 'thread'
135
+ end
136
+
137
+ def help(cmd)
138
+ %{
139
+ th[read] c[ur[rent]]\t\tshow current thread
140
+ }
141
+ end
142
+ end
143
+ end
144
+
145
+ class ThreadResumeCommand < Command # :nodoc:
146
+ self.control = true
147
+ self.need_context = true
148
+
149
+ def regexp
150
+ /^\s*th(?:read)?\s+resume\s+(\d+)\s*$/
151
+ end
152
+
153
+ def execute
154
+ c = get_context(@match[1].to_i)
155
+ case
156
+ when c == @state.context
157
+ print_msg "It's the current thread."
158
+ when c.ignored?
159
+ print_msg "Can't resume the debugger thread."
160
+ else
161
+ c.resume
162
+ print_context(c)
163
+ end
164
+ end
165
+
166
+ class << self
167
+ def help_command
168
+ 'thread'
169
+ end
170
+
171
+ def help(cmd)
172
+ %{
173
+ th[read] resume <nnn>\t\tresume thread nnn
174
+ }
175
+ end
176
+ end
177
+ end
178
+ end