diff options
| author | Nick Roberts | 2005-12-08 22:10:50 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-12-08 22:10:50 +0000 |
| commit | 135f440c1547b9dc8219592b2843fb3de7b08fac (patch) | |
| tree | 2e34fd4973622a7adc7062e5f9968b9c92aeda04 | |
| parent | c48971b2b87e87b7e2529124f2d340d92d799f7a (diff) | |
| download | emacs-135f440c1547b9dc8219592b2843fb3de7b08fac.tar.gz emacs-135f440c1547b9dc8219592b2843fb3de7b08fac.zip | |
(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." | |||
| 436 | If the GUD BUFFER is not running a supported debugger, then turn | 436 | If the GUD BUFFER is not running a supported debugger, then turn |
| 437 | off the specialized speedbar mode. BUFFER is not used, but are | 437 | off the specialized speedbar mode. BUFFER is not used, but are |
| 438 | required by the caller." | 438 | required by the caller." |
| 439 | (when (and (boundp 'gud-comint-buffer) | 439 | (when (and gud-comint-buffer |
| 440 | gud-comint-buffer | ||
| 441 | ;; gud-comint-buffer might be killed | 440 | ;; gud-comint-buffer might be killed |
| 442 | (buffer-name gud-comint-buffer)) | 441 | (buffer-name gud-comint-buffer)) |
| 443 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) | 442 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) |
| @@ -661,6 +660,11 @@ The directory containing FILE becomes the initial working directory | |||
| 661 | and source-file directory for your debugger." | 660 | and source-file directory for your debugger." |
| 662 | (interactive (list (gud-query-cmdline 'gdb))) | 661 | (interactive (list (gud-query-cmdline 'gdb))) |
| 663 | 662 | ||
| 663 | (if (and gud-comint-buffer | ||
| 664 | (buffer-name gud-comint-buffer) | ||
| 665 | (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) | ||
| 666 | (error "Multiple debugging is only supported with \"gdb --fullname\"")) | ||
| 667 | |||
| 664 | (gud-common-init command-line nil 'gud-gdb-marker-filter) | 668 | (gud-common-init command-line nil 'gud-gdb-marker-filter) |
| 665 | (set (make-local-variable 'gud-minor-mode) 'gdb) | 669 | (set (make-local-variable 'gud-minor-mode) 'gdb) |
| 666 | 670 | ||
| @@ -3330,7 +3334,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") | |||
| 3330 | (gud-tooltip-activate-mouse-motions-if-enabled) | 3334 | (gud-tooltip-activate-mouse-motions-if-enabled) |
| 3331 | (if (and | 3335 | (if (and |
| 3332 | gud-comint-buffer | 3336 | gud-comint-buffer |
| 3333 | (buffer-name gud-comint-buffer); gud-comint-buffer might be kille | 3337 | (buffer-name gud-comint-buffer); gud-comint-buffer might be killed |
| 3334 | (with-current-buffer gud-comint-buffer | 3338 | (with-current-buffer gud-comint-buffer |
| 3335 | (memq gud-minor-mode '(gdbmi gdba)))) | 3339 | (memq gud-minor-mode '(gdbmi gdba)))) |
| 3336 | (if gud-tooltip-mode | 3340 | (if gud-tooltip-mode |
| @@ -3384,9 +3388,8 @@ This function must return nil if it doesn't handle EVENT." | |||
| 3384 | (let (process) | 3388 | (let (process) |
| 3385 | (when (and (eventp event) | 3389 | (when (and (eventp event) |
| 3386 | gud-tooltip-mode | 3390 | gud-tooltip-mode |
| 3387 | (boundp 'gud-comint-buffer) | ||
| 3388 | gud-comint-buffer | 3391 | gud-comint-buffer |
| 3389 | (buffer-name gud-comint-buffer); gud-comint-buffer might be killed | 3392 | (buffer-name gud-comint-buffer); might be killed |
| 3390 | (setq process (get-buffer-process gud-comint-buffer)) | 3393 | (setq process (get-buffer-process gud-comint-buffer)) |
| 3391 | (posn-point (event-end event)) | 3394 | (posn-point (event-end event)) |
| 3392 | (or (and (eq gud-minor-mode 'gdba) (not gdb-active-process)) | 3395 | (or (and (eq gud-minor-mode 'gdba) (not gdb-active-process)) |