This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use observers to report stop events.
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 10 Jun 2008 16:57:29 +0400
- Subject: Re: [RFA] Use observers to report stop events.
- References: <200804112145.58456.vladimir@codesourcery.com> <200806101336.24223.vladimir@codesourcery.com> <20080610124313.GA5279@caradoc.them.org>
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