Class: Debugger::ThreadListCommand
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
40
41
42
43
44
|
# File 'lib/ruby-debug/commands/threads.rb', line 40
def help(cmd)
%{
th[read] l[ist]\t\t\tlist all threads
}
end
|
.help_command ⇒ Object
36
37
38
|
# File 'lib/ruby-debug/commands/threads.rb', line 36
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
29
30
31
32
33
|
# File 'lib/ruby-debug/commands/threads.rb', line 29
def execute
threads = Debugger.contexts.sort_by{|c| c.thnum}.each do |c|
display_context(c)
end
end
|
#regexp ⇒ Object
25
26
27
|
# File 'lib/ruby-debug/commands/threads.rb', line 25
def regexp
/^\s*th(?:read)?\s+l(?:ist)?\s*$/
end
|