From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2645 invoked by alias); 11 Apr 2014 10:01:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 2558 invoked by uid 89); 11 Apr 2014 10:01:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-gw2-out.broadcom.com Received: from mail-gw2-out.broadcom.com (HELO mail-gw2-out.broadcom.com) (216.31.210.63) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Apr 2014 10:01:43 +0000 Received: from irvexchcas06.broadcom.com (HELO IRVEXCHCAS06.corp.ad.broadcom.com) ([10.9.208.53]) by mail-gw2-out.broadcom.com with ESMTP; 11 Apr 2014 03:24:17 -0700 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 11 Apr 2014 03:01:42 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.174.1; Fri, 11 Apr 2014 03:01:42 -0700 Received: from [10.177.73.80] (unknown [10.177.73.80]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 6E6DEEAD4D; Fri, 11 Apr 2014 03:01:41 -0700 (PDT) Message-ID: <5347BD84.5030200@broadcom.com> Date: Fri, 11 Apr 2014 12:57:00 -0000 From: Andrew Burgess User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: CC: Subject: Re: MI async status output References: <20140409210803.GA3166@linux> <5346B226.40209@cs.msu.su> <20140410201259.GA15060@linux> In-Reply-To: <20140410201259.GA15060@linux> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00040.txt.bz2 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. Hope that helps, Andrew