 
       (run-hooks 'rdebug-mode-hook))))
 
+
+(defun rdebug-restart ()
+  "Restart the debugged Ruby script.
+
+An exec restart is used."
+  (interactive)
+  (if (yes-or-no-p "Restart? ")
+      (gud-call "restart")))
 
 (defun rdebug-quit ()
   "Kill the debugger process associated with the current buffer.

           "Down N stack frames (numeric arg).")
  (gud-def gud-finish "finish"      "\C-f"
           "Finish executing current function.")
  (gud-def gud-next   "next %p"     "\C-n"
           "Step one line (skip functions).")
  (gud-def gud-print  "p %e"        "\C-p"
           "Evaluate Ruby expression at point.")
  (gud-def gud-source-resync "up 0" "\C-l"

  (define-key map [S-f5]  'rdebug-quit)
  (define-key map [f9]    'rdebug-toggle-source-breakpoint)
  (define-key map [C-f9]  'rdebug-toggle-source-breakpoint-enabled)
  (define-key map [f10]   'rdebug-next)
  (define-key map [f11]   'rdebug-step)
  (define-key map [S-f11] 'gud-finish))


