This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI async status output
- From: Bob Rossi <bob at brasko dot net>
- To: gdb at sourceware dot org
- Date: Mon, 14 Apr 2014 06:33:13 -0400
- Subject: Re: MI async status output
- Authentication-results: sourceware.org; auth=none
- References: <20140409210803 dot GA3166 at linux> <5346B226 dot 40209 at cs dot msu dot su> <20140410201259 dot GA15060 at linux> <5347BD84 dot 5030200 at broadcom dot com> <20140412002538 dot GA27657 at linux>
On Fri, Apr 11, 2014 at 08:25:38PM -0400, Bob Rossi wrote:
> On Fri, Apr 11, 2014 at 11:01:40AM +0100, Andrew Burgess wrote:
> > On 10/04/2014 9:12 PM, Bob Rossi wrote:
> > > On Thu, Apr 10, 2014 at 07:00:54PM +0400, Vladimir Prus wrote:
> > >> On 10.04.2014 01:08, Bob Rossi wrote:
> > >>> I'm writing unit tests for my MI parser and was trying to get
> > >>> GDB to output some out of band, async records of type:
> > >>> status-async-output.
> > > ...
> > >>> Does anyone have a simple recipe for getting GDB to output some
> > >>> async status output?
...
> > I did the this:
> > 1. Build hello-world test program
> > 2. Start gdbserver as: gdbserver :1234 helloworld.exe
> > 3. Start gdb as: gdb -i mi helloworld.exe
> > 4. Within gdb:
> > (gdb) -target-select remote :1234
> > (gdb) -target-download
> > # Bunch of +download lines
...
> Thanks! Unfortunately, GDB is dumping invalid MI here.
> ...
> +download,{section=".interp",section-size="28",total-size="2466"}
> ...
> ^done...
> (gdb)
>
> The MI rules are:
> 1)
> +download,{section=".interp",section-size="28",total-size="2466"}
> ^ (+ eaten here)
> status-async-output ==>
> [ token ] "+" async-output nl
>
> 2)
> +download,{section=".interp",section-size="28",total-size="2466"}
> ^ (download eaten by async-class)
> async-output ==>
> async-class ( "," result )*
> async-class ==>
> "stopped" | others (where others includes download i guess)
>
> 3)
> +download,{section=".interp",section-size="28",total-size="2466"}
> ^ (, eaten here)
> async-output ==>
> async-class ( "," result )*
>
> 4) Error here: result must start with a variable name.
> +download,{section=".interp",section-size="28",total-size="2466"}
> ^ (syntax error)
> result ==>
> variable "=" value
> variable ==>
> string
>
> Did I find a bug or is this well known behavior of GDB and MI?
>
> If it's well known behavior, can anyone explain it? It's possible that
> result could be just a 'value' instead of 'variable = value'. In this
> case that would solve the problem perhaps.
>
> Any advice would be appreciated.
Ping.
Bob Rossi