From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16610 invoked by alias); 6 Dec 2012 20:56:33 -0000 Received: (qmail 16599 invoked by uid 22791); 6 Dec 2012 20:56:32 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Dec 2012 20:56:27 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB6KuMvE015206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Dec 2012 15:56:22 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qB6KuLrh024615; Thu, 6 Dec 2012 15:56:21 -0500 Message-ID: <50C10675.3000405@redhat.com> Date: Thu, 06 Dec 2012 20:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 1/6] Add a field 'installed' for each location of tracepoint. References: <1354596282-32526-1-git-send-email-yao@codesourcery.com> <1354596282-32526-2-git-send-email-yao@codesourcery.com> In-Reply-To: <1354596282-32526-2-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00115.txt.bz2 On 12/04/2012 04:44 AM, Yao Qi wrote: > Hi, this patch adds a field 'installed' indicating whether a > location of tracepoint is installed on target. In CLI, the output of > 'info tracepoint' will be like this, > > info trace > Num Type Disp Enb Address What^M > 2 tracepoint keep y 0x080485b1 in main at gdb.trace/change-loc.c:29 > installed y I'd prefer: 2 tracepoint keep y 0x080485b1 in main at gdb.trace/change-loc.c:29 installed on target 3 tracepoint keep y 0x080485b1 in main at gdb.trace/change-loc.c:29 not installed on target As the other similar cases of more breakpoint info more textual as well: 4 breakpoint keep y 0x0804c8a5 in main at ../../src/gdb/gdb.c:29 breakpoint already hit 1 time This should be documented in the manual and NEWS, both the CLI changes, and the MI change (this patch adds the "installed" field to various MI things). > Of course, the breakpoint related MI notifications are changed as > well. > > gdb: > > 2012-12-03 Yao Qi > > * breakpoint.c (print_one_breakpoint_location): Add field > 'installed' for each location of a tracepoint. > --- > gdb/breakpoint.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 53944a6..40d2edd 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -6123,6 +6123,17 @@ print_one_breakpoint_location (struct breakpoint *b, > ui_out_field_int (uiout, "pass", t->pass_count); > ui_out_text (uiout, " \n"); > } > + > + if (!header_of_multiple) > + { > + annotate_field (11); > + ui_out_text (uiout, "\tinstalled "); > + /* LOC is NULL means the tracepoint is still pending, set > + field 'installed' 'n'. */ > + ui_out_field_string (uiout, "installed", > + loc ? (loc->inserted ? "y" : "n") : "n"); > + ui_out_text (uiout, " \n"); Not sure about the pending case. Can you show how does that look like? Why not just display nothing in that case? How does the MI output look like in the pending case? > + } > } > > if (ui_out_is_mi_like_p (uiout) && !part_of_multiple) > -- Pedro Alves