Namespace
- CLASS DEBUGGER__::Context
Methods
- B
- C
- D
- G
- I
- M
- R
- S
- T
- W
Constants
MUTEX | = | Mutex.new |
Instance Public methods
break_points()
Link
context(thread=Thread.current)
Link
debug_thread_info(input, binding)
Link
# File ../ruby/lib/debug.rb, line 850 def debug_thread_info(input, binding) case input when /^l(?:ist)?/ make_thread_list thread_list_all when /^c(?:ur(?:rent)?)?$/ make_thread_list thread_list(@thread_list[Thread.current]) when /^(?:sw(?:itch)?\s+)?(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" else thread_list(@thread_list[th]) context(th).stop_next th.run return :cont end when /^stop\s+(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" elsif th.stop? @stdout.print "Already stopped.\n" else thread_list(@thread_list[th]) context(th).suspend end when /^resume\s+(\d+)/ make_thread_list th = get_thread($1.to_i) if th == Thread.current @stdout.print "It's the current thread.\n" elsif !th.stop? @stdout.print "Already running." else thread_list(@thread_list[th]) th.run end end end
display()
Link
get_thread(num)
Link
interrupt()
Link
make_thread_list()
Link
resume()
Link
# File ../ruby/lib/debug.rb, line 778 def resume MUTEX.synchronize do make_thread_list @thread_list.each do |th,| next if th == Thread.current context(th).clear_suspend end waiting.each do |th| th.run end waiting.clear end # Schedule other threads to restart as soon as possible. Thread.pass end
set_last_thread(th)
Link
set_trace( arg )
Link
stdout=(s)
Link
suspend()
Link
thread_list(num)
Link
# File ../ruby/lib/debug.rb, line 815 def thread_list(num) th = get_thread(num) if th == Thread.current @stdout.print "+" else @stdout.print " " end @stdout.printf "%d ", num @stdout.print th.inspect, "\t" file = context(th).instance_eval{@file} if file @stdout.print file,":",context(th).instance_eval{@line} end @stdout.print "\n" end
thread_list_all()
Link