 
 (defun rdebug-process-sentinel (process event)
   "Restore the original window configuration when the debugger process exits."
+  (gud-sentinel process event)
   (rdebug-debug-enter "rdebug-process-sentinel"
     (rdebug-debug-message "status=%S event=%S state=%S\n"
                           (process-status process)

      (puthash "breakpoints" 'rdebug--setup-breakpoints-buffer map)
      (puthash "stack" 'rdebug--setup-stack-buffer map)
      (puthash "variables" 'rdebug--setup-variables-buffer map)
      map)))

(defun rdebug-process-annotation (name contents)

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