Re: MI output command error

Eli Zaretskii
2005-03-12T10:23:16Z

> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Sat, 12 Mar 2005 10:49:41 +1300
> Cc: Dave Korn <dave.korn@artimi.com>,
> Karganov Konstantin <kostik@ispras.ru>, GDB <gdb@sources.redhat.com>
>
> > Lack of implementation. No one's done the work.
>
> Thats understandable. However, given that MI was introduced in GDB 5.0, I
> think there should be something in the manual explaining this as it seems to
> create a lot of confusion. It needs to be written by someone who understands
> the issue i.e not myself.

I'm all for documenting this in some useful way, but I fail to see how
could this be done. Describing the async operation itself is already
a big challenge, as the details are extremely confusing, unless you've
read the code several times and have a good understanding of the
underlying system calls (like `poll' and `select'). Differences
between interpreters add another dimension of complexity to this.

> I believe that operation is asynchronous with certain targets,
> although I have never managed to create these conditions, even with
> gdbserver over TCP.

Actually, I think that the asynchronous operation is independent of
the target. The infrastructure for this is in event-loop.c, which is
not specific to any target.

The problem with implementing async operation with the CLI interface
is, AFAIU, not its dependence on some target-specific feature, but
rather the need to redesig the CLI front end to do something useful
while waiting for a prolonged operation to run to completion. For GUI
front ends, such as those who use MI, it's clear what to do during
that time, and the separate-process implementation makes it even
easier to design. By contrast, the CLI interface is part of the GDB
process.

I don't consider myself a specialist in these matters, so please take
the above with a grain of salt (i.e., it might all be wrong ;-).