    (list (gud-query-cmdline 'rdebug)))
 
   (rdebug-debug-enter "rdebug"
+  (if (eq rdebug-frame-configuration-state 'original)
+      (setq rdebug-original-frame-configuration (current-frame-configuration)))
+  (setq rdebug-frame-configuration-state 'debugger)
   ; Parse the command line and pick out the script name and whether --annotate
   ; has been set.
   (let* ((words (split-string-and-unquote command-line))

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

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

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