diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2005-12-08 22:10:50 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2005-12-08 22:10:50 +0000 |
commit | 135f440c1547b9dc8219592b2843fb3de7b08fac (patch) | |
tree | 2e34fd4973622a7adc7062e5f9968b9c92aeda04 | |
parent | c48971b2b87e87b7e2529124f2d340d92d799f7a (diff) | |
download | emacs-135f440c1547b9dc8219592b2843fb3de7b08fac.tar.gz |
(gud-speedbar-buttons, gud-tooltip-tips):
No need to check gud-comint-buffer is bound.
(gdb): Prevent multiple debugging when first session uses gdba.
-rw-r--r-- | lisp/progmodes/gud.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index f6ef6f1e810..2d6d1fa3980 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -436,8 +436,7 @@ ZERO are not used, but are required by the caller." If the GUD BUFFER is not running a supported debugger, then turn off the specialized speedbar mode. BUFFER is not used, but are required by the caller." - (when (and (boundp 'gud-comint-buffer) - gud-comint-buffer + (when (and gud-comint-buffer ;; gud-comint-buffer might be killed (buffer-name gud-comint-buffer)) (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) @@ -661,6 +660,11 @@ The directory containing FILE becomes the initial working directory and source-file directory for your debugger." (interactive (list (gud-query-cmdline 'gdb))) + (if (and gud-comint-buffer + (buffer-name gud-comint-buffer) + (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) + (error "Multiple debugging is only supported with \"gdb --fullname\"")) + (gud-common-init command-line nil 'gud-gdb-marker-filter) (set (make-local-variable 'gud-minor-mode) 'gdb) @@ -3330,7 +3334,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") (gud-tooltip-activate-mouse-motions-if-enabled) (if (and gud-comint-buffer - (buffer-name gud-comint-buffer); gud-comint-buffer might be kille + (buffer-name gud-comint-buffer); gud-comint-buffer might be killed (with-current-buffer gud-comint-buffer (memq gud-minor-mode '(gdbmi gdba)))) (if gud-tooltip-mode @@ -3384,9 +3388,8 @@ This function must return nil if it doesn't handle EVENT." (let (process) (when (and (eventp event) gud-tooltip-mode - (boundp 'gud-comint-buffer) gud-comint-buffer - (buffer-name gud-comint-buffer); gud-comint-buffer might be killed + (buffer-name gud-comint-buffer); might be killed (setq process (get-buffer-process gud-comint-buffer)) (posn-point (event-end event)) (or (and (eq gud-minor-mode 'gdba) (not gdb-active-process)) |