From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25919 invoked by alias); 10 Mar 2008 22:06:52 -0000 Received: (qmail 25905 invoked by uid 22791); 10 Mar 2008 22:06:51 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Mar 2008 22:06:25 +0000 Received: from kahikatea.snap.net.nz (41.30.255.123.static.snap.net.nz [123.255.30.41]) by viper.snap.net.nz (Postfix) with ESMTP id 1B5C13D9FB8; Tue, 11 Mar 2008 11:06:23 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id E3E638FC6D; Tue, 11 Mar 2008 11:06:04 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18389.45259.883736.858298@kahikatea.snap.net.nz> Date: Mon, 10 Mar 2008 22:06:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Async mode fixes. In-Reply-To: <200803101302.15250.vladimir@codesourcery.com> References: <200803051027.29575.vladimir@codesourcery.com> <200803101057.51401.vladimir@codesourcery.com> <18388.64350.993440.984898@kahikatea.snap.net.nz> <200803101302.15250.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.1.91.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00110.txt.bz2 > You mean this bit of code: > > else if (sync_execution) > { > /* Don't print the prompt. We are executing the target in > synchronous mode. */ > args->action = EXECUTE_COMMAND_SUPRESS_PROMPT; > return; > } > > ? Yes. > I actually planned to remove it without further ado, after this async > patch goes in. My reasoning is that the current behaviour is just bizarre. For sync > target, any exec commands results in > > ^running > (gdb) > > whereas for async target, due to above fragment, you can sometimes not get > a prompt -- and this is backward. That would seem to work. > Of course, this code only deals with printing the prompt, whereas we still > have the bigger issue -- namely that if we execute "continue" using > -interpreter-exec, then GDB does not accept the input while continue runs, > and -exec-interrupt does not work. I don't think this is right but I don't want to work on your patch while it's not part of GDB. > Apple branch fixes that by not setting > sync_execution inside async_disable_stdin, but I find the fix suspect -- if > we give up terminal to inferior and then try to read something, I'm not sure > it will work. It does work with "target async", but target async does not > actually mess with terminal. > > One solution is probably to never disable stdin when an external tty > is used for program output. Or to never disable stdin when top-level > interpreter is MI. I must admit I don't know the right solution, yet. > > - Volodya -- Nick http://www.inet.net.nz/~nickrob