From: Bob Rossi <bob@brasko.net>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: gdb@sourceware.org
Subject: Re: MI async status output
Date: Sat, 12 Apr 2014 00:25:00 -0000 [thread overview]
Message-ID: <20140411125715.GA21537@linux> (raw)
In-Reply-To: <5347BD84.5030200@broadcom.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
next prev parent reply other threads:[~2014-04-11 12:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 21:08 Bob Rossi
2014-04-10 15:01 ` Vladimir Prus
2014-04-10 20:13 ` Vladimir Prus
2014-04-11 10:01 ` Bob Rossi
2014-04-11 12:57 ` Andrew Burgess
2014-04-12 0:25 ` Bob Rossi [this message]
2014-04-14 6:25 ` Bob Rossi
2014-04-17 12:07 ` Bob Rossi
2014-04-18 10:46 ` Vladimir Prus
2014-04-18 13:11 ` Bob Rossi
2014-04-18 16:30 ` Vladimir Prus
2014-04-18 16:42 ` Bob Rossi
2014-04-18 17:59 ` Vladimir Prus
2014-04-18 19:27 ` Bob Rossi
2014-04-18 20:39 ` Terekhov, Mikhail
2014-04-19 8:28 ` Bob Rossi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140411125715.GA21537@linux \
--to=bob@brasko.net \
--cc=aburgess@broadcom.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox