Re: [RFC/MI] Event Records vs Commands

Andrew Cagney
2002-06-16T02:01:28Z

> Hi,
>
> This is the promised gdbmi.texinfo proposal that I referred to in:
>
> http://sources.redhat.com/ml/gdb/2002-06/msg00106.html
>
> This patch formalizes events in MI. Specifically, I propose to whack
> notify-async-output from aync-record and add event-record to
> out-of-band-record.

Breakpoint events can occure ``asynchronously'': a shared library load
might trigger the setting of a breakpoint; a user's breakpoint commands
might change the state of a breakpoint and then continue.

Hence, as far as I can tell you just want to ``notify-async-output''.

> I've modified all the breakpoint command examples to reflect the fact that
> breakpoint commands will no longer print information about the breakpoint.
> Instead this information is retrieved from the event. For example:
>
> - old way
> (gdb)
> -break-insert main
> ^done,bkpt={number="1",addr="0xdeadbeef",file="main.c",line="5"}
> (gdb)
>
> - new way
> (gdb)
> -break-insert main
> =breakpoint-create,number="1"
> (gdb)

I believe this is wrong. There should still be a ``^done''.

> -break-info 1
> ^done,BreakpointTable={...}

> I have completed the changes to MI to accomplish this, and I will submit
> these patches once this is all approved. I plan to check this all into my
> interpreter branch (kseitz_interps-20020528-branch) until everything
> is finalized. I will then migrate the whole (approved) thing into cvs
> head.

Keep in mind that the examples are lifted from the testsuite.

Given breakpoint output appears everywhere in the testsuite, the import
is going to be a little large. There should still be a few things that
can be cherry picked though - some of the testsuite shuffle for instance.

> @example
> -> -symbol-file xyz.exe
> ! <- *breakpoint,nr="3",address="0x123",source="a.c:123"
> <- (@value{GDBP})
> @end example
>
> --- 395,402 ----
>
> @example
> -> -symbol-file xyz.exe
> ! <- =breakpoint-create,number="3"
> ! <- ^done
> <- (@value{GDBP})
> @end example

If breakpoint-create included complete breakpoint information an
additional roundtrip could be avoided. Is this significant? I suspect
this is a question for some of the apple hackers as they would have a
better feel for how critical this one is :-)

Andrew