From: Miles Bader Date: Mon, 10 May 2004 08:40:27 +0000 (+0000) Subject: Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 X-Git-Tag: ttn-vms-21-2-B4~6317 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9878c26e852ea353f499582b6a803d85ad9c6da;p=emacs.git Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-296 Allow restarting an existing debugger session that's exited 2004-05-10 Miles Bader * lisp/progmodes/gud.el (gud-common-init): Only consider an existing buffer an error if the debugger process is actually running. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 425c85e1884..356f35c01a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-05-10 Miles Bader + + * lisp/progmodes/gud.el (gud-common-init): Only consider an existing + buffer an error if the debugger process is actually running. + 2004-05-10 Juanma Barranquero * subr.el (remove-overlays, read-passwd): Fix docstring. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 9cb3ae26c3b..035b5da875a 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -4,7 +4,7 @@ ;; Maintainer: FSF ;; Keywords: unix, tools -;; Copyright (C) 1992,93,94,95,96,1998,2000,02,2003 Free Software Foundation, Inc. +;; Copyright (C) 1992,93,94,95,96,1998,2000,02,03,04 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -2387,7 +2387,8 @@ comint mode, which see." (filepart (and file-word (concat "-" (file-name-nondirectory file)))) (existing-buffer (get-buffer (concat "*gud" filepart "*")))) (pop-to-buffer (concat "*gud" filepart "*")) - (if existing-buffer (error "This program is already running under gdb")) + (when (and existing-buffer (get-buffer-process existing-buffer)) + (error "This program is already running under gdb")) ;; Set the dir, in case the buffer already existed with a different dir. (setq default-directory dir) ;; Set default-directory to the file's directory.