Class: Debugger::ThreadSwitchCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::ThreadSwitchCommand
show all
- Defined in:
- lib/ruby-debug/commands/threads.rb
Overview
Thread switch Must come after “Thread resume” because “switch” is optional
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.help(cmd) ⇒ Object
169
170
171
172
173
|
# File 'lib/ruby-debug/commands/threads.rb', line 169
def help(cmd)
%{
th[read] [sw[itch]] <nnn>\tswitch thread context to nnn
}
end
|
.help_command ⇒ Object
165
166
167
|
# File 'lib/ruby-debug/commands/threads.rb', line 165
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
155
156
157
158
159
160
161
162
|
# File 'lib/ruby-debug/commands/threads.rb', line 155
def execute
c = parse_thread_num_for_cmd("thread switch", @match[1])
return unless c
display_context(c)
c.stop_next = 1
c.thread.run
@state.proceed
end
|
#regexp ⇒ Object
151
152
153
|
# File 'lib/ruby-debug/commands/threads.rb', line 151
def regexp
/^\s*th(?:read)?\s*(?:sw(?:itch)?)?\s+(\S+)\s*$/
end
|