This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB/MI questions
On Thu, Jan 19, 2017 at 02:30:58PM +0000, Marc Khouzam wrote:
> > Hi,
> >
> > I'm attempting to convert CGDB (a GDB front end) from annotations to MI.
> > Two questions I've run up against:
> >
> > The first is, with annotations, it's easy to tell when GDB can except
> > another command, just wait for the prompt annotation.
> > With GDB/MI it seems a little trickier. So far I have this:
> > Wait for the gdb prompt
> > If you have not recieved a *running yet, it's safe to run a command.
> > Otherwise, if you have recieved a *running, you need to wait for
> > the prompt and for *stopped.
> > Anyone have a better approach? Does multi target impact this?
>
> In most cases, you don't need to care about this. You can normally
> send other commands even when GDB is blocked and they will be
> buffered until GDB unblocks.
I understand that your opinion is to just send the commands and let them
buffer. However, it avoids the question. Is there a technique to know
if GDB is ready for input using MI?
Thanks,
Bob Rossi