(defvar gdb-first-prompt t)
+(defvar gud-filter-pending-text nil
+ "Non-nil means this is text that has been saved for later in `gud-filter'.")
+
;;;###autoload
(defun gdb (command-line)
"Run gdb on program FILE in buffer *gud-FILE*.
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
(setq paragraph-start comint-prompt-regexp)
(setq gdb-first-prompt t)
+ (setq gud-filter-pending-text nil)
(run-hooks 'gdb-mode-hook))
;; One of the nice features of GDB is its impressive support for
"Non-nil means don't process anything from the debugger right now.
It is saved for when this flag is not set.")
-(defvar gud-filter-pending-text nil
- "Non-nil means this is text that has been saved for later in `gud-filter'.")
-
;; These functions are responsible for inserting output from your debugger
;; into the buffer. The hard work is done by the method that is
;; the value of gud-marker-filter.
(gud-filter proc ""))))))
(defvar gud-minor-mode-type nil)
+(defvar gud-overlay-arrow-position nil)
+(put 'gud-overlay-arrow-position 'overlay-arrow-string "=>")
+(add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position)
(defun gud-sentinel (proc msg)
(cond ((null (buffer-name (process-buffer proc)))
;; buffer killed
;; Stop displaying an arrow in a source file.
- (setq overlay-arrow-position nil)
+ (setq gud-overlay-arrow-position nil)
(set-process-buffer proc nil)
(if (memq gud-minor-mode-type '(gdbmi gdba))
(gdb-reset)
(gud-reset)))
((memq (process-status proc) '(signal exit))
;; Stop displaying an arrow in a source file.
- (setq overlay-arrow-position nil)
+ (setq gud-overlay-arrow-position nil)
(with-current-buffer gud-comint-buffer
(if (memq gud-minor-mode-type '(gdbmi gdba))
(gdb-reset)
(goto-line line)
(setq pos (point))
(setq overlay-arrow-string "=>")
- (or overlay-arrow-position
- (setq overlay-arrow-position (make-marker)))
- (set-marker overlay-arrow-position (point) (current-buffer)))
+ (or gud-overlay-arrow-position
+ (setq gud-overlay-arrow-position (make-marker)))
+ (set-marker gud-overlay-arrow-position (point) (current-buffer)))
(cond ((or (< pos (point-min)) (> pos (point-max)))
(widen)
(goto-char pos))))
- (if window (set-window-point window overlay-arrow-position))))))
+ (if window (set-window-point window gud-overlay-arrow-position))))))
;; The gud-call function must do the right thing whether its invoking
;; keystroke is from the GUD buffer itself (via major-mode binding)