From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14224 invoked by alias); 11 Apr 2014 12:57:24 -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 14214 invoked by uid 89); 11 Apr 2014 12:57:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pb0-f53.google.com Received: from mail-pb0-f53.google.com (HELO mail-pb0-f53.google.com) (209.85.160.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Apr 2014 12:57:23 +0000 Received: by mail-pb0-f53.google.com with SMTP id rp16so5377727pbb.12 for ; Fri, 11 Apr 2014 05:57:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Uz8LsgQ/41mwgLorJwfE4qDPnH6uhfPfQpx1FHo3kK8=; b=ltAmph8f2fbD2XyS5NKwJX1dlrF/1fzxsf1EToxtZY4nf3K472zUG9kty31Yl9a5EC g4TID70ZM8UqOkkMX2RyrdPPJaqnFto6FXzjZJK9mFzZR+G0hWAbm70Eg5q0G37WxqG5 NgdXVXQ6phH83Q3aEajoUvSyquNTqx3VsGRywY8J+a7MOY8CmdfRIBmOxTncpHty+POm M/iR7xS6XHFrQQdRyOQAGX2iV6vszcKsdDGHsV2FBl8dSQeGoQ2dje0ugngRXcxG9n06 eOE9G83cEAVP+3aC8LV2Tsgydgbo1vl8s0rzgeINQr9IU/wpW/K/kn/gJuZxUj3iTEVm 1wZg== X-Gm-Message-State: ALoCoQnINrSwFW5Kla0xynt2zMprYxHnJIRey8TJ+cjJdhNx4QkIbwXCJBSWmVnL1zZASVP1TIN8 X-Received: by 10.68.240.5 with SMTP id vw5mr26991980pbc.113.1397221041273; Fri, 11 Apr 2014 05:57:21 -0700 (PDT) Received: from linux (ip72-200-182-56.ri.ri.cox.net. [72.200.182.56]) by mx.google.com with ESMTPSA id ir10sm15575510pbc.59.2014.04.11.05.57.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 11 Apr 2014 05:57:20 -0700 (PDT) Date: Sat, 12 Apr 2014 00:25:00 -0000 From: Bob Rossi To: Andrew Burgess Cc: gdb@sourceware.org Subject: Re: MI async status output Message-ID: <20140411125715.GA21537@linux> References: <20140409210803.GA3166@linux> <5346B226.40209@cs.msu.su> <20140410201259.GA15060@linux> <5347BD84.5030200@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5347BD84.5030200@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00041.txt.bz2 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