 
       (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.

                        :enable '(get-buffer-process gud-comint-buffer)))

    (define-key menu [step]
      (rdebug-menu-item common-map "Step into" 'gud-step
                        :enable '(get-buffer-process gud-comint-buffer)))

    (define-key menu [next]
      (rdebug-menu-item common-map "Step over" 'gud-next
                        :enable '(get-buffer-process gud-comint-buffer)))

    (define-key menu [cont]
      (rdebug-menu-item common-map "Continue" 'gud-cont
                        :enable '(get-buffer-process gud-comint-buffer)))

    (define-key map [menu-bar debugger line1] '(menu-item "--"))


(defvar rdebug-local-short-key-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map "b" 'gud-break)
    (define-key map "t" 'rdebug-toggle-source-breakpoint-enabled)
    (define-key map "p" 'gud-print)
    (rdebug-populate-secondary-buffer-map-plain map)
    map)
  "Keymap used in `rdebug-local-short-key-mode'.")
