   "Display the rdebug display buffer."
   (interactive)
   (rdebug-display-secondary-buffer "display"))
+
+(defun rdebug-display-output-buffer ()
+  "Display the rdebug output buffer."
+  (interactive)
+  (rdebug-display-secondary-buffer "output"))
 
 (defun rdebug-display-variables-buffer ()
   "Display the rdebug variables buffer."

      (setq buffer-read-only t)
      (let ((inhibit-read-only t)
            (setup-func (gethash name rdebug--annotation-setup-map)))
        (erase-buffer)
        (insert contents)
        (when setup-func (funcall setup-func buf comint-buffer)))))))

(defun rdebug-setup-windows ()
  "Layout the window pattern for `rdebug-many-windows'. This was mostly copied
from `gdb-setup-windows', but simplified."
  (rdebug-debug-enter "rdebug-setup-windows"
  (pop-to-buffer gud-comint-buffer)
  (let ((script-name gud-target-name))
    (rdebug-process-annotation "help" "")
    (delete-other-windows)
    (split-window nil ( / ( * (window-height) 3) 4))
    (split-window nil ( / (window-height) 3))
    (split-window-horizontally)
    (other-window 1)
    (set-window-buffer 
     (selected-window) 
     (get-buffer-create (format "*rdebug-variables-%s*" script-name)))
    (other-window 1)
    (switch-to-buffer
     (cond (gud-last-last-frame
            (gud-find-file (car gud-last-last-frame)))
           (gud-target-name
            (gud-find-file gud-target-name))
           (t
            ;; Put buffer list in window if we
            ;; can't find a source file.
            (list-buffers-noselect))))
    (other-window 1)
    (set-window-buffer 
     (selected-window) 
     (get-buffer-create (format "*rdebug-stack-%s*" script-name)))
    (split-window-horizontally)
    (other-window 1)
    (set-window-buffer 
     (selected-window) 
     (get-buffer-create (format "*rdebug-breakpoints-%s*" script-name)))
    (other-window 1)
    (goto-char (point-max))
    (rdebug-set-window-configuration-state 'debugger))))
  
(defun rdebug-restore-windows ()
  "Equivalent of `gdb-restore-windows' for rdebug."
  (interactive)

  (define-key map "B" 'rdebug-display-breakpoints-buffer)
  (define-key map "C" 'rdebug-display-cmd-buffer)
  (define-key map "D" 'rdebug-display-display-buffer)
  (define-key map "O" 'rdebug-display-output-buffer)
  (define-key map "V" 'rdebug-display-variables-buffer)
  (define-key map "S" 'rdebug-display-stack-buffer)
  (define-key map "?" 'rdebug-display-secondary-window-help-buffer))
