Re: MI output command error

Bob Rossi
2005-03-11T21:36:33Z

On Fri, Mar 11, 2005 at 04:30:43PM -0500, Daniel Jacobowitz wrote:
> On Sat, Mar 12, 2005 at 10:03:55AM +1300, Nick Roberts wrote:
> >
> > > I'm as mystified as Dave as to how you could read the manual and
> > > believe GDB/MI was designed to operate synchronously. A number of MI
> > > commands have documentation that begins with "Asynchronous command." In
> > > particular, look at -exec-interrupt, which makes no sense as a
> > > synchronous command.
> >
> > I think the problem that people like Bob and myself have with this, is that
> > when GDB is compiled out of the box, it doesn't operate asynchronously. So
> > if we run GDB using MI, -exec-interrupt *doesn't* interrupt the inferior:
> > ...
> > ^done
> > (gdb)
> > 111-exec-continue
> > 111^running
> > (gdb)
> > 222-exec-interrupt
> >
> > Dave Korn's explanation is very helpful. Considering the MI output to be
> > asynchronous, makes it much easier to understand. The fact remains, however,
> > that for native targets at least (the most common configuration?), operation
> > is synchronous. It leads me to wonder how this discrepancy arises.
>
> Lack of implementation. No one's done the work.

So currently, is it best to realize that the MI protocol is asynchronous,
but to treat GDB as if it's executing syncronously?

Basically, send commands to GDB as if the MI interface was synchronous?

Bob Rossi