diff options
| author | Chong Yidong | 2012-04-20 15:13:25 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-20 15:13:25 +0800 |
| commit | 8912063b467877f8f30751e1b0077791805cbcea (patch) | |
| tree | a54ae135322f215a5b3c60e090ab882218ba2029 | |
| parent | f30d612a7a628828baa7c333629a10295605291b (diff) | |
| download | emacs-8912063b467877f8f30751e1b0077791805cbcea.tar.gz emacs-8912063b467877f8f30751e1b0077791805cbcea.zip | |
Fix last change.
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-sentinel): Don't do
anything if gdb process is killed.
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 455727f9e02..f2d8f1f75b7 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1536,12 +1536,16 @@ DOC is an optional documentation string." | |||
| 1536 | (defun gdb-inferior-io-sentinel (proc str) | 1536 | (defun gdb-inferior-io-sentinel (proc str) |
| 1537 | (when (eq (process-status proc) 'failed) | 1537 | (when (eq (process-status proc) 'failed) |
| 1538 | ;; When the debugged process exits, Emacs gets an EIO error on | 1538 | ;; When the debugged process exits, Emacs gets an EIO error on |
| 1539 | ;; read from the pty, and stops listening to it. Remove the pty, | 1539 | ;; read from the pty, and stops listening to it. If the gdb |
| 1540 | ;; make a new one, and pass it to gdb. | 1540 | ;; process is still running, remove the pty, make a new one, and |
| 1541 | (let ((buffer (process-buffer proc))) | 1541 | ;; pass it to gdb. |
| 1542 | ;; `comint-exec' deletes the original process as a side effect. | 1542 | (let ((gdb-proc (get-buffer-process gud-comint-buffer)) |
| 1543 | (comint-exec buffer "gdb-inferior" nil nil nil) | 1543 | (io-buffer (process-buffer proc))) |
| 1544 | (gdb-inferior-io--init-proc (get-buffer-process buffer))))) | 1544 | (when (and gdb-proc (process-live-p gdb-proc) |
| 1545 | (buffer-live-p io-buffer)) | ||
| 1546 | ;; `comint-exec' deletes the original process as a side effect. | ||
| 1547 | (comint-exec io-buffer "gdb-inferior" nil nil nil) | ||
| 1548 | (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) | ||
| 1545 | 1549 | ||
| 1546 | (defconst gdb-frame-parameters | 1550 | (defconst gdb-frame-parameters |
| 1547 | '((height . 14) (width . 80) | 1551 | '((height . 14) (width . 80) |