From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25648 invoked by alias); 28 Jun 2008 09:41:08 -0000 Received: (qmail 25639 invoked by uid 22791); 28 Jun 2008 09:41:07 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 28 Jun 2008 09:40:40 +0000 Received: from kahikatea.snap.net.nz (214.31.255.123.static.snap.net.nz [123.255.31.214]) by viper.snap.net.nz (Postfix) with ESMTP id 502DF3DA96D; Sat, 28 Jun 2008 21:40:32 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id B60748FC6D; Sat, 28 Jun 2008 21:40:30 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18534.1805.519374.851454@kahikatea.snap.net.nz> Date: Sat, 28 Jun 2008 10:16:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [MI/RFC] Emit ^running via observer. In-Reply-To: <200806280949.09304.vladimir@codesourcery.com> References: <200806140108.24047.vladimir@codesourcery.com> <200806270829.53537.vladimir@codesourcery.com> <18533.33379.962529.54094@kahikatea.snap.net.nz> <200806280949.09304.vladimir@codesourcery.com> X-Mailer: VM 7.19 under Emacs 22.2.50.3 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-06/txt/msg00530.txt.bz2 > > Async mode decouples the output from the input. This allows a CLI command > > that executes the inferior to (indirectly) generate MI output. That's why > > I was interested in async mode and that's what this test is for. The work > > has actually been done for more general reasons, such as non-stop mode. I > > think the MI output is just a fortunate side-effect. > > Err, async mode does one thing -- allows commands to be processed while > inferiour is still running. Unless you explicitly make use of this > functionality, there's no difference from sync mode. (Of course, there's a > bunch of checks for target_can_async_p in GDB code, so some difference in > output is possible, but in theory there should be none). I don't know what > you mean by decoupling output from the input -- for example, then *running > notification is emitted for CLI just fine, and this does not require async > mode. This is my understanding: *running is presumably an observer that is only set in MI and fires whenever execution (re)starts. It doesn't depend on the (immediate) interpreter. In sync mode when a CLI command starts execution, GDB waits for it to stop before switching back to MI and returning to the event loop. In async mode it doesn't, and when inferior_event_handler runs after execution has stopped, GDB has already switched back to MI and so prints MI output. -- Nick http://www.inet.net.nz/~nickrob