[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107865: Fix last change.
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107865: Fix last change. |
Date: |
Fri, 20 Apr 2012 15:13:25 +0800 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107865
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Fri 2012-04-20 15:13:25 +0800
message:
Fix last change.
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-sentinel): Don't do
anything if gdb process is killed.
modified:
lisp/progmodes/gdb-mi.el
=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el 2012-04-20 06:39:29 +0000
+++ b/lisp/progmodes/gdb-mi.el 2012-04-20 07:13:25 +0000
@@ -1536,12 +1536,16 @@
(defun gdb-inferior-io-sentinel (proc str)
(when (eq (process-status proc) 'failed)
;; When the debugged process exits, Emacs gets an EIO error on
- ;; read from the pty, and stops listening to it. Remove the pty,
- ;; make a new one, and pass it to gdb.
- (let ((buffer (process-buffer proc)))
- ;; `comint-exec' deletes the original process as a side effect.
- (comint-exec buffer "gdb-inferior" nil nil nil)
- (gdb-inferior-io--init-proc (get-buffer-process buffer)))))
+ ;; read from the pty, and stops listening to it. If the gdb
+ ;; process is still running, remove the pty, make a new one, and
+ ;; pass it to gdb.
+ (let ((gdb-proc (get-buffer-process gud-comint-buffer))
+ (io-buffer (process-buffer proc)))
+ (when (and gdb-proc (process-live-p gdb-proc)
+ (buffer-live-p io-buffer))
+ ;; `comint-exec' deletes the original process as a side effect.
+ (comint-exec io-buffer "gdb-inferior" nil nil nil)
+ (gdb-inferior-io--init-proc (get-buffer-process io-buffer))))))
(defconst gdb-frame-parameters
'((height . 14) (width . 80)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107865: Fix last change.,
Chong Yidong <=