From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: gdbui hang Date: Mon, 10 May 2004 18:41:03 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16543.48815.692499.486290@nick.uklinux.net> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1084214444 27484 80.91.224.253 (10 May 2004 18:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 18:40:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 10 20:40:37 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNFhd-0006Hb-00 for ; Mon, 10 May 2004 20:40:37 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNFhc-00089J-00 for ; Mon, 10 May 2004 20:40:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNFfO-0007ND-B6 for emacs-devel@quimby.gnus.org; Mon, 10 May 2004 14:38:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNFcZ-0006UW-7W for emacs-devel@gnu.org; Mon, 10 May 2004 14:35:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNFYm-0005RN-UK for emacs-devel@gnu.org; Mon, 10 May 2004 14:32:05 -0400 Original-Received: from [194.247.51.70] (helo=nick.uklinux.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNFUz-0004mk-0j; Mon, 10 May 2004 14:27:34 -0400 Original-Received: by nick.uklinux.net (Postfix, from userid 501) id 383D575FDF; Mon, 10 May 2004 18:41:04 +0100 (BST) Original-To: Miles Bader In-Reply-To: X-Mailer: VM 6.97 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23067 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23067 > [A related problem is that if I kill the *gud-foo* buffer to try and > recover from the hang, and then start another gdb process, it will often > fail to work, saying `selecting deleted buffer' in a command I give. In > general it's a good idea to recover gracefully if a buffer is deleted; > the gdb mode probably shouldn't be keeping any session state outside of > the gdb buffer itself -- i.e., try to make any state variables > buffer-local in the gdb session buffer.] This is because kill-buffer sends SIGHUP to the associated process. If GDB is expecting input (as in the case you describe) then the process is immune to SIGHUP and doesn't get killed. Try this, even with the old GUD, type list-buffers and you get something like: Proc Status Buffer Tty Command ---- ------ ------ --- ------- gud-myprog run (Killed) /dev/pts/4 gdb -fullname /home/nick/myprog Since the process is not killed, gud-sentinel doesn't get called and, in the case of gdb-ui, the associated buffers stay there. To run gdb again requires that these buffers (partial-output, breakpoints etc) are deleted first. "kill -9" will kill the GDB process but leave the inferior process. Its messy, I agree, but I don't have an answer to this one. Does anybody else have a solution? Nick