Class: Debugger::ThreadStopCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/threads.rb

Overview

:nodoc:

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

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



91
92
93
94
95
# File 'lib/ruby-debug/commands/threads.rb', line 91

def help(cmd)
  %{
    th[read] stop <nnn>\t\tstop thread nnn
  }
end

.help_commandObject



87
88
89
# File 'lib/ruby-debug/commands/threads.rb', line 87

def help_command
  'thread'
end

Instance Method Details

#executeObject



79
80
81
82
83
84
# File 'lib/ruby-debug/commands/threads.rb', line 79

def execute
  c = parse_thread_num_for_cmd("thread stop", @match[1])
  return unless c 
  c.suspend
  display_context(c)
end

#regexpObject



75
76
77
# File 'lib/ruby-debug/commands/threads.rb', line 75

def regexp
  /^\s*th(?:read)?\s+stop\s*(\S*)\s*$/
end