From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15682 invoked by alias); 4 Jan 2003 21:59:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15668 invoked from network); 4 Jan 2003 21:59:14 -0000 Received: from unknown (HELO mta06-svc.ntlworld.com) (62.253.162.46) by 209.249.29.67 with SMTP; 4 Jan 2003 21:59:14 -0000 Received: from saltburn ([213.107.125.99]) by mta06-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20030104215859.BMEJ20174.mta06-svc.ntlworld.com@saltburn> for ; Sat, 4 Jan 2003 21:58:59 +0000 Date: Sat, 04 Jan 2003 21:59:00 -0000 From: Steven O'Brien To: gdb@sources.redhat.com Subject: Re: bug in gdb tty command on cygwin Message-Id: <20030104220048.4b179927.steven.obrien2@ntlworld.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00046.txt.bz2 Chris Faylor wrote: >[Reply-To set to gdb mailing list] >On Sat, Jan 04, 2003 at 09:44:05AM +0000, Steven O'Brien wrote: >>Hi >>I submitted a patch to fix a bug in cygwin gdb to the gdb-patches list >->see: >>http://sources.redhat.com/ml/gdb-patches/2002-12/msg00761.html >> >>However, this did not attract any response. What is the next step in >>getting this patch into gdb? > >Patience? Thanks for your swift response Chris :) >>With this patch I am able to build and run a fully functional anjuta >IDE>on cygwin-xfree86. Without it anjuta's debugger will not work on >cygwin.>I am sure that other X11 GUIs for gdb on cygwin would also >benefit from>this patch. >> >>The patch moves one line of code in just one file that is only used in >>the cygwin build; and code that is only invoked if the --tty option or >>tty command are invoked. > >I saw your patch but since it invoked a "Huh?" response, it required >some study. I don't see any correlation between your description of >the problem and your proposed patch. I don't know why closing the tty >later would cause the kind of problem you were talking about, so it >isn't an obvious "plop it right in" kind of patch. > >cgf You are right, the problem should not logically occur because of this. However, the problem is real is is cured by my patch. In any case, closing the tty after Create Process is logically incorrect, because the inferior then inherits this fd which could concievably change its behaviour. My patch therefore is a correction for an error in the gdb code. As a bonus, the patch also fixes the broken gdb tty command, which is what I need for cygwin-xfree86 anjuta. After more testing, I have found that the problem does not occur when the target tty is a windows console running bash. It does not matter whether gdb is running in a console or pseudo-terminal. My testing previously had used only rxvt (both X11 and native windows), xterm and gnome-terminal, all of which cause the failure. I guess this might indicate some problem with cygwin pty code. But the gdb tty command has been broken for a long time, so its unlikely that the recent cygwin tty changes are to blame. Thanks again for looking at this, Steven