This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Use observers to report stop events.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]