GDB/MI questions

Bob Rossi bob@brasko.net
Thu Jan 19 03:15:00 GMT 2017


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?

Second, from the CLI if you run the command "next", then if you hit
the enter key, GDB will run the "next" command again.
However, in GDB/MI if you run -interpreter-exec console "next", and then
follow that with the Enter key, GDB does nothing.
Is there a way to run the last command?

Thanks,
Bob Rossi



More information about the Gdb mailing list