From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24589 invoked by alias); 10 Jun 2008 12:58:02 -0000 Received: (qmail 24576 invoked by uid 22791); 10 Jun 2008 12:58:01 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Jun 2008 12:57:35 +0000 Received: (qmail 23123 invoked from network); 10 Jun 2008 12:57:33 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Jun 2008 12:57:33 -0000 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: [RFA] Use observers to report stop events. Date: Tue, 10 Jun 2008 13:25:00 -0000 User-Agent: KMail/1.9.9 Cc: Joel Brobecker , gdb-patches@sources.redhat.com References: <200804112145.58456.vladimir@codesourcery.com> <200806101336.24223.vladimir@codesourcery.com> <20080610124313.GA5279@caradoc.them.org> In-Reply-To: <20080610124313.GA5279@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806101657.30671.vladimir@codesourcery.com> 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/msg00201.txt.bz2 On Tuesday 10 June 2008 16:43:13 Daniel Jacobowitz wrote: > On Tue, Jun 10, 2008 at 01:36:23PM +0400, Vladimir Prus wrote: > > If proceed throws, before calling normal_stop, we'll get back to event loop, > > and run cleanup. We won't call the observer. It's an issue if we've printed > > "*running" and thrown after after. However, it's the issue we have now, as > > well -- we print ^running even before calling proceed, and if something later > > throws, we'll never print *stopped. Possible solutions are: > > - Require that frontend refresh thread state on ^error > > - Emit *stopped if exception is thrown (this requires checking that the > > target is actually stopped, if exception is thrown). > > Or just don't print *running until we're actually running. We emit *running only when we're actually running -- after resuming target. The danger, as I understand it, is that if exception is thrown after we've resumed target, but before normal_stop called an observer, we'll have *running not paired with *stopped, so the frontend will think the target is still running. - Volodya