One problem identified in the existing GDB/MI output syntax was the difficulty in differentiating between a tuple such as:
{number="1",type="breakpoint",disp="keep",enabled="y"}
where each value has a unique label, and a list such as:
{"1","2","4"}
{bp="1",bp="2",bp="4"}
where values are un-labeled or the label is duplicated.
What follows is a draft revision to the output specification that addresses this problem.
The output from GDB/MI consists of zero or more out-of-band records optionally followed by a single result record, the result record being for the most recent command input. The sequence is terminated by ``(gdb)''.
Asynchronous GDB/MI output is similar.
Each output record directly associated with an input command is prefixed
by the input commands token.
output ==>
[ result-record ] "(gdb)" nl
result-record ==>
[ token ] "^" result-class { "," result } nl
out-of-band-record ==>
| stream-record
async-record ==>
| status-async-output | notify-async-output
exec-async-output ==>
[ token ] "*" async-output
status-async-output ==>
[ token ] "+" async-output
notify-async-output ==>
[ token ] "=" async-output
async-output ==>
result-class ==>
| "running" | "connected" | "error" | "exit"
async-class ==>
| others depending on need as still in development
result ==>
value ==>
| tupple | list
tupple ==>
| "{" result { "," result } "}"
list ==>
[]" | "[" value { "," value } "]"
string ==>
c-string ==>
stream-record ==>
| target-stream-output | log-stream-output
console-stream-output ==>
target-stream-output ==>
log-stream-output ==>
nl ==>
| CR-LF
token ==>
In addition, the following are still being developed.
query
Notes:
token is from the corresponding request. If an execution
command is interrupted by the -exec-interrupt command, the token
associated with the `*stopped' message is the one of the original
execution command, not the one of the interrupt-command.
Packaging copyright © 1988-2000 OAR Corporation Context copyright by each document's author. See Free Software Foundation for information.