summaryrefslogtreecommitdiff
path: root/lib/debug.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-10 01:57:22 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-10 01:57:22 +0000
commit09ac765b2f9e915ab5dead8c3b21aa5eb8748f62 (patch)
treef4926c381878079aca54585a0a8051ee4a305b42 /lib/debug.rb
parent40ca06cb4bd5f1a2f411648b6a2b8fc9b80916a5 (diff)
Merged my changes from HEAD
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/debug.rb')
-rw-r--r--lib/debug.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/debug.rb b/lib/debug.rb
index d22982b5a9..9ae119f8fb 100644
--- a/lib/debug.rb
+++ b/lib/debug.rb
@@ -255,6 +255,9 @@ class Context
def debug_command(file, line, id, binding)
MUTEX.lock
+ unless defined?($debugger_restart) and $debugger_restart
+ callcc{|c| $debugger_restart = c}
+ end
set_last_thread(Thread.current)
frame_pos = 0
binding_file = file
@@ -524,6 +527,9 @@ class Context
when /^\s*p\s+/
stdout.printf "%s\n", debug_eval($', binding).inspect
+ when /^\s*r(?:estart)?$/
+ $debugger_restart.call
+
when /^\s*h(?:elp)?$/
debug_print_help()
@@ -541,11 +547,11 @@ class Context
stdout.print <<EOHELP
Debugger help v.-0.002b
Commands
- b[reak] [file|class:]<line|method>
+ b[reak] [file:|class:]<line|method>
b[reak] [class.]<line|method>
set breakpoint to some position
wat[ch] <expression> set watchpoint to some expression
- cat[ch] <an Exception> set catchpoint to an exception
+ cat[ch] (<exception>|off) set catchpoint to an exception
b[reak] list breakpoints
cat[ch] show catchpoint
del[ete][ nnn] delete some or all breakpoints