# HG changeset patch # User Miles Bader # Date 1084178427 0 # Node ID bb2dcb7fd983ad6c7d074fa865dd7a8c27c27dcc # Parent 953e2486f30fab68e0036668375778442c78ff4e 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 -r 953e2486f30f -r bb2dcb7fd983 lisp/ChangeLog --- a/lisp/ChangeLog Mon May 10 04:15:14 2004 +0000 +++ b/lisp/ChangeLog Mon May 10 08:40:27 2004 +0000 @@ -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 -r 953e2486f30f -r bb2dcb7fd983 lisp/progmodes/gud.el --- a/lisp/progmodes/gud.el Mon May 10 04:15:14 2004 +0000 +++ b/lisp/progmodes/gud.el Mon May 10 08:40:27 2004 +0000 @@ -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 @@ (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.