Next: , Up: GDB/MI

27.1 gdb/mi General Design

Interaction of a GDB/MI frontend with gdb involves three parts—commands sent to gdb, responses to those commands and notifications. Each command results in exactly one response, indicating either successful completion of the command, or an error. For the commands that do not resume the target, the response contains the requested information. For the commands that resume the target, the response only indicates whether the target was successfully resumed. Notifications is the mechanism for reporting changes in the state of the target, or in gdb state, that cannot conveniently be associated with a command and reported as part of that command response.

The important examples of notifications are:

There's no guarantee that whenever an MI command reports an error, gdb or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface.