This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
GDB/MI questions
- From: Bob Rossi <bob at brasko dot net>
- To: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 18 Jan 2017 22:14:45 -0500
- Subject: GDB/MI questions
- Authentication-results: sourceware.org; auth=none
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