Re: RFC: MI output during program execution

Bob Rossi
2005-08-09T22:34:38Z

On Tue, Aug 09, 2005 at 10:27:34PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 9 Aug 2005 14:13:11 -0400
> > From: Bob Rossi <bob@brasko.net>
> > Cc: Jim Ingham <jingham@apple.com>, gdb-patches@sources.redhat.com
> >
> > > I thought we wanted to have _both_ CLI and MI style response in this
> > > case: the CLI response to display in the command buffer, the MI
> > > response to be caught by the front end in order to change the display
> > > in other windows. Am I missing something?
> >
> > Yes, this sounds nice to me. Currently, querying GDB/MI's state, via an
> > MI function allows this, without any modifications to GDB/MI.
>
> How would the FE know that it needs to query the state? Isn't that
> the problem?

Eli, don't get me wrong. I fully support the observer approach,
especially from what Jim has said.

However, in the meantime, I think it's possible to query the state of
GDB at any moment. So, if you allow the user to enter a command via
-interpreter-exec console, you could then follow that command up with
other MI commands to sync the state of GDB with the state of the FE.

The problem is, commands like "are you still running?" defiantly carry a
race condition along with them.

Bob Rossi