 	  (gud-call (format "p %s=%s" var value)))
       (message "No variable found"))))
 
+;; -- display (a.k.a watch window)
+
+;; TODO: Add display, delete display.
+
+(defvar rdebug-display-mode-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    map))
+
+(defun rdebug-display-mode ()
+  "Major mode for rdebug display (watch) window.
+
+\\{rdebug-display-mode}"
+  (interactive)
+  (kill-all-local-variables)
+  (setq major-mode 'rdebug-display-mode)
+  (setq mode-name "RDEBUG Display")
+  (setq buffer-read-only t)
+  (use-local-map rdebug-display-mode-map)
+  (run-mode-hooks 'rdebug-display-mode-hook))
+
+(defun rdebug--setup-display-buffer (buf)
+  (rdebug-debug-enter "rdebug--setup-display-buffer"
+    (with-current-buffer buf (rdebug-display-mode))))
+
+;; -- Reset support
+
 (defadvice gud-reset (before rdebug-reset)
   "rdebug cleanup - remove debugger's internal buffers (frame, breakpoints, 
 etc.)."


(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

         (string-to-number (substring s (match-beginning 2) (match-end 2))))
        ))))

(defun rdebug-toggle-breakpoint (pt)
  "Toggles the breakpoint at PT in the breakpoints buffer."
  (interactive "d")
  (save-excursion
    (goto-char pt)
    (let ((s (buffer-substring (line-beginning-position) (line-end-position))))
      (when (string-match rdebug--breakpoint-regexp s)
        (let* ((enabled
                (string= (substring s (match-beginning 2) (match-end 2)) "y"))
               (cmd (if enabled "disable" "enable"))
               (bpnum (substring s (match-beginning 1) (match-end 1))))
          (gud-call (format "%s breakpoint %s" cmd bpnum)))))))

(defun rdebug-delete-breakpoint (pt)
  "Deletes the breakpoint at PT in the breakpoints buffer."
