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: Re: gud breakage: ^done,changelist=[] Date: Sat, 30 Oct 2004 08:48:55 +1300 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <16770.40615.484276.300510@farnswood.snap.net.nz> References: <87zn2ktlim.fsf@peder.flower> <16755.42540.548120.883521@farnswood.snap.net.nz> <87acukte3e.fsf@peder.flower> <16767.24485.426051.737854@farnswood.snap.net.nz> 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 1099079749 28834 80.91.229.6 (29 Oct 2004 19:55:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Oct 2004 19:55:49 +0000 (UTC) Cc: emacs-devel@gnu.org, Jan Nieuwenhuizen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 29 21:55:33 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CNcqT-0002AT-00 for ; Fri, 29 Oct 2004 21:55:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNcyL-0005YQ-0N for ged-emacs-devel@m.gmane.org; Fri, 29 Oct 2004 16:03:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CNcyA-0005YE-WC for emacs-devel@gnu.org; Fri, 29 Oct 2004 16:03:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CNcy9-0005Xd-TM for emacs-devel@gnu.org; Fri, 29 Oct 2004 16:03:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNcy9-0005Xa-ON for emacs-devel@gnu.org; Fri, 29 Oct 2004 16:03:29 -0400 Original-Received: from [202.124.110.112] (helo=farnswood.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CNcpx-000541-6V; Fri, 29 Oct 2004 15:55:02 -0400 Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 1162B627EE; Fri, 29 Oct 2004 20:48:55 +0100 (BST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: X-Mailer: VM 6.97 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29147 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29147 > > So, in the short term, with care (albeit tedious), this problem should be > > avoidable. > > The above "mistake" is easy to make. When debugging programs which don't read from standard input, such as Emacs (and Lilypond?) the conditional clause in gdb-send can be removed: (defun gdb-send (proc string) "A comint send filter for gdb. This filter may simply queue output for a later time." (gdb-enqueue-input (concat string "\n"))) This should eliminate the problem for such programs but will eventually hang for those expecting input. The general problem seems intractable because Emacs has no way of knowing if input is going to gdb or the inferior. The original code (gdba.el) got round the problem by always using a separate buffer for program input. Perhaps I should do what Stefan suggested a while ago and create a lisp command, gdb-resync, so that the user can recover control during a debug session and all is not lost. Nick