   (when rdebug-many-windows
     (rdebug-setup-windows)))
 
+(defun rdebug-display-original-frame-configuration ()
+  "Display the layout of windows prior to starting the ruby debugger."
+  (when rdebug-original-frame-configuration
+    (set-frame-configuration rdebug-original-frame-configuration)
+    (message
+     "Type `M-x rdebug-restore-windows RET' to see debugger windows.")))
+
 (defun rdebug-set-windows (&optional name)
   "Sets window used in multi-window frame and issues
 rdebug-restore-windows if rdebug-many-windows is set"

(defconst rdebug-annotation-end-regexp
  "\n")

;; rdebugtrack constants
(defconst rdebugtrack-stack-entry-regexp
      "^(\\([-a-zA-Z0-9_/.]*\\):\\([0-9]+\\)):[ \t]?\\(.*\n\\)"

    (setq gud-target-name target-name)
    (when rdebug-buffer (kill-buffer rdebug-buffer))
    (rename-buffer rdebug-buffer-name)

    ;; Setup exit callback so that the original frame configuration
    ;; can be restored.
    (let ((process (get-buffer-process gud-comint-buffer)))
      (if process
          (set-process-sentinel process
                                'rdebug-process-sentinel)))

    (set (make-local-variable 'gud-minor-mode) 'rdebug)

