Class: Debugger::ThreadResumeCommand
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
#debugger_thread?, #display_context
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
172
173
174
175
176
|
# File 'lib/ruby-debug/commands/threads.rb', line 172
def help(cmd)
%{
th[read] resume <nnn>\t\tresume thread nnn
}
end
|
.help_command ⇒ Object
168
169
170
|
# File 'lib/ruby-debug/commands/threads.rb', line 168
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
# File 'lib/ruby-debug/commands/threads.rb', line 152
def execute
c = get_context(@match[1].to_i)
case
when c == @state.context
print "It's the current thread.\n"
when debugger_thread?(c)
print "Can't resume the debugger thread.\n"
when !c.thread.stop?
print "Already running."
else
display_context(c)
c.thread.run
end
end
|
#regexp ⇒ Object
148
149
150
|
# File 'lib/ruby-debug/commands/threads.rb', line 148
def regexp
/^\s*th(?:read)?\s+resume\s+(\d+)\s*$/
end
|