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: Andrew Burgess <aburgess at broadcom dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 11 Apr 2014 08:57:15 -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>
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 think the only case where "+" notification is used is load command
> >> with sufficiently big binary. See mi-main.c:mi_load_progress. I don't
> >> know whether it can be triggered without bare-metal target.
> >
> > It's unobvious to me how to get GDB to trigger this functionality.
> >
> > I'd be greatful if anyone could show a quick example getting code
> > coverage on GDB where the mi-main.c:mi_load_progress code is hit
> > which outputs the
> > fputs_unfiltered ("+download", raw_stdout);
> > lines (or similiar async status output in GDB).
>
> It's triggered as part of the progress update for MI loads. The
> progress callback is called at least, for each section that is
> loaded.
>
> I did the this:
>
> 1. Build hello-world test program, which contained at least a .text and
> .data section.
> 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
> # Single ^done line.
Thanks! That worked great!
I wouldn't have thought of using gdbserver.
Thanks again,
Bob Rossi