public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [MI] -break-insert: (a)synchronous?
@ 2002-06-13 13:55 Keith Seitz
  2002-06-13 17:30 ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2002-06-13 13:55 UTC (permalink / raw)
  To: gdb

Hi,

Ok, I believe that there was some general consensus that we want
asynchronus event notifications. Do we also want only one channel for the
notification of these events?

It seems to me that we've got ways to communicate the breakpoint-create
event: events and commands. Right now, -break-insert overrides the event
handlers so that it can grab the data about the breakpoint when it is
created, but inserting a breakpoint via another interpreter (like the
console) will send something slightly different:

(gdb)
-break-insert main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08075056",func="main",file="../../src/gdb/main.c",line="734",times="0"}
(gdb)
-interpreter-exec console "break captured_main"
During symbol reading, couldn't parse type; debugger out of date?.
During symbol reading, bad structure-type format.
*"breakpoint-create,number=1"
Breakpoint 1 at 0x80743ba: file ../../src/gdb/main.c, line 122.
^done
(gdb)

(Ok, so we could also just add the "bkpt=..." info that is being used in
-break-insert onto this command, but in any case, we get no "event" when
inserting via -break-insert.)

I would prefer that we use only event notifications, of course.

That way, the the UI could call -break-info on these events to collect
the information. This way, I only have to write one parser to deal with this
event. (Actually, if I had to deal with both, I would just grab the
breakpoint number from the output of -break-insert.)

Am I being too aggressive/naive?
Keith

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-13 13:55 [MI] -break-insert: (a)synchronous? Keith Seitz
@ 2002-06-13 17:30 ` Andrew Cagney
  2002-06-13 19:27   ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-06-13 17:30 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb

> Hi,
> 
> Ok, I believe that there was some general consensus that we want
> asynchronus event notifications. Do we also want only one channel for the
> notification of these events?
> 
> It seems to me that we've got ways to communicate the breakpoint-create
> event: events and commands. Right now, -break-insert overrides the event
> handlers so that it can grab the data about the breakpoint when it is
> created, but inserting a breakpoint via another interpreter (like the

> (Ok, so we could also just add the "bkpt=..." info that is being used in
> -break-insert onto this command, but in any case, we get no "event" when
> inserting via -break-insert.)
> 
> I would prefer that we use only event notifications, of course.
> 
> That way, the the UI could call -break-info on these events to collect
> the information. This way, I only have to write one parser to deal with this
> event. (Actually, if I had to deal with both, I would just grab the

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.

Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-13 17:30 ` Andrew Cagney
@ 2002-06-13 19:27   ` Keith Seitz
  2002-06-14  9:33     ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2002-06-13 19:27 UTC (permalink / raw)
  To: gdb

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.

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"

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)

The exact meaning of this example is not really clear to me, but I
presume that it is meant to demonstrate what happens when a breakpoint is
inserted as a result of loading a new symbol file (however that may
occur). In any case, the example is certainly not exec-async-output. In
fact, it is nothing in the MI lingo.

To get the ball rolling on cleaning some of this up, I will submit a patch
which changes (replaces?) the meaning of notify-async-output to include
events in the debugger (breakpoints inserted/deleted/modified,
architecture changes, stack frame changes, switching current thread, etc),
and I will update all the examples.

If someone reads this differently than I do, please speak up.

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.)

Keith



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-13 19:27   ` Keith Seitz
@ 2002-06-14  9:33     ` Andrew Cagney
  2002-06-14 10:49       ` Keith Seitz
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-06-14  9:33 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb

> 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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-14  9:33     ` Andrew Cagney
@ 2002-06-14 10:49       ` Keith Seitz
  2002-06-14 11:23         ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Seitz @ 2002-06-14 10:49 UTC (permalink / raw)
  To: gdb

On Fri, 14 Jun 2002, Andrew Cagney wrote:

> This means another MI version bump (currently it is on 1).  See how mi0
> vs mi1 was handled (especially in the testsuite).

I'll take care of it. Unless I hear otherwise, I will modify the code to
support old and new. Are we going to set a date or time limit on
deprecating the old mis?

> 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.

Yes, indeed. I guess it's a good time to make drastic changes? ;-)

> 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.

Will do.

Thanks for the note.
Keith


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-14 10:49       ` Keith Seitz
@ 2002-06-14 11:23         ` Daniel Jacobowitz
  2002-06-14 11:48           ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2002-06-14 11:23 UTC (permalink / raw)
  To: gdb

On Fri, Jun 14, 2002 at 10:49:53AM -0700, Keith Seitz wrote:
> On Fri, 14 Jun 2002, Andrew Cagney wrote:
> 
> > This means another MI version bump (currently it is on 1).  See how mi0
> > vs mi1 was handled (especially in the testsuite).
> 
> I'll take care of it. Unless I hear otherwise, I will modify the code to
> support old and new. Are we going to set a date or time limit on
> deprecating the old mis?

Please?  In particular, I don't want us to keep accumulating testsuites
for different protocol versions forever.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [MI] -break-insert: (a)synchronous?
  2002-06-14 11:23         ` Daniel Jacobowitz
@ 2002-06-14 11:48           ` Andrew Cagney
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cagney @ 2002-06-14 11:48 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

> On Fri, Jun 14, 2002 at 10:49:53AM -0700, Keith Seitz wrote:
> 
>> On Fri, 14 Jun 2002, Andrew Cagney wrote:
>> 
> 
>> > This means another MI version bump (currently it is on 1).  See how mi0
>> > vs mi1 was handled (especially in the testsuite).
> 
>> 
>> I'll take care of it. Unless I hear otherwise, I will modify the code to
>> support old and new. Are we going to set a date or time limit on
>> deprecating the old mis?
> 
> 
> Please?  In particular, I don't want us to keep accumulating testsuites
> for different protocol versions forever.

I was thinking of having it release or time limited.  One release may 
not be long enough though.  Mind you, at this stage I'm guessing as 
people using MI haven't got their changes merged in.

Andrew


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-06-14 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-13 13:55 [MI] -break-insert: (a)synchronous? Keith Seitz
2002-06-13 17:30 ` Andrew Cagney
2002-06-13 19:27   ` Keith Seitz
2002-06-14  9:33     ` Andrew Cagney
2002-06-14 10:49       ` Keith Seitz
2002-06-14 11:23         ` Daniel Jacobowitz
2002-06-14 11:48           ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).