Module: Debugger::ThreadFunctions
- Included in:
- ThreadCurrentCommand, ThreadListCommand, ThreadResumeCommand, ThreadStopCommand, ThreadSwitchCommand
- Defined in:
- lib/ruby-debug/commands/threads.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#debugger_thread?(c) ⇒ Boolean
16 17 18 |
# File 'lib/ruby-debug/commands/threads.rb', line 16 def debugger_thread?(c) [Debugger.thread, Debugger.control_thread].include?(c.thread) end |
#display_context(c) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ruby-debug/commands/threads.rb', line 3 def display_context(c) c_flag = c.thread == Thread.current ? '+' : ' ' d_flag = debugger_thread?(c) ? '!' : ' ' print "%s%s", c_flag, d_flag print "%d ", c.thnum print "%s\t", c.thread.inspect last_frame = c.frames.first if last_frame print "%s:%d", last_frame.file, last_frame.line end print "\n" end |