This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [MI] -break-insert: (a)synchronous?
On Thu, 13 Jun 2002, Andrew Cagney wrote:
The command was implemented that way to match its documented spec. I
remember wondering about alternate implementations at the time.
Sounds like it is time to either define a new command (not capture the
events) or change the spec.
Ok, then I would like to propose that we change the spec to use events and
only events when a command results in some event. This reduces the
redundancy.
This means another MI version bump (currently it is on 1). See how mi0
vs mi1 was handled (especially in the testsuite).
BTW, there is another necessary interface change lurking in the wings -
frames need to be changed to lists (dump of frame_id) instead of single
values - so the version bump is likely a good idea.
How to do it?
I guess prototype the changes with -i=mi2 and then when ready do the
testsuite suffle for the test cases that are effected.
I'm working on modifying gdbmi.texinfo, but I am a little confused about
all the stream options:
"*" = "exec-async-output"
"+" = "status-async-output"
"=" = "notify-async-output"
I don't think there was much checking for compliance of this.
From the manual ([] = my comments):
o status-async-output contains on-going status information about the
progess of slow operation. All status output is prefixed by "+".
[I presume that the biggest client for this is downloading to a target.]
o exec-async-output contains asynchronous state change on the target
(stopped, started, disappeared). All Async output is prefixed by "*".
[This seems to be called only by async target state changes.]
o notify-async-output contains supplementary information that the client
should handle (e.g., a new breakpoint information). All notify
output is prefixed by "=".
[I don't know where this is used. I am unable to find any references
to this.]
From the descriptions above, it sounds like event notifications should
occur on the notify-async-output channel, "=".
However, if one reads down to the "Command With Side Effects" section, one
sees:
-> -symbol-file xyz.exe
<- *breakpoint,nr="3",address="0x123",source="a.c:123"
<- (gdb)
I think this is a straight error.
So, here's how I interpret what should happen:
(gdb)
-break-insert main
=breakpoint-create,number="1"
^done,bkpt=...
(gdb)
(I will also be proposing that we whack the result in this case, since we
will get an event notification, too.)
Andrew