From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 699 invoked by alias); 11 Dec 2012 17:26:04 -0000 Received: (qmail 672 invoked by uid 22791); 11 Dec 2012 17:25:57 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,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; Tue, 11 Dec 2012 17:25:52 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBBHPpgv023701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Dec 2012 12:25:51 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBBHPnZr017401; Tue, 11 Dec 2012 12:25:50 -0500 Message-ID: <50C76C9C.70207@redhat.com> Date: Tue, 11 Dec 2012 17:26: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> <50C10675.3000405@redhat.com> <50C488D0.8010609@codesourcery.com> In-Reply-To: <50C488D0.8010609@codesourcery.com> Content-Type: text/plain; charset=UTF-8 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/msg00349.txt.bz2 On 12/09/2012 12:49 PM, Yao Qi wrote: > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 94874ec..5d5033f 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -6123,6 +6123,25 @@ print_one_breakpoint_location (struct breakpoint *b, > ui_out_field_int (uiout, "pass", t->pass_count); > ui_out_text (uiout, " \n"); > } > + > + /* Don't display it when tracepoint or tracepoint location is > + pending. */ I'm not a native speaker, but using a pronoun ("it") as a forward reference to refer to something that only appears afterwards parses awkwardly to me. I suggest: /* For tracepoints, display the installed state, but not if the tracepoint or tracepoint location is pending. */ > + if (!header_of_multiple && loc != NULL && !loc->shlib_disabled) > + { > + annotate_field (11); > + > + if (ui_out_is_mi_like_p (uiout)) > + ui_out_field_string (uiout, "installed", > + loc->inserted ? "y" : "n"); > + else > + { > + if (loc->inserted) > + ui_out_text (uiout, "\t"); > + else > + ui_out_text (uiout, "\tnot "); > + ui_out_text (uiout, "installed on target\n"); > + } > + } > } Wait, what is making sure this is only printed for tracepoints? -- Pedro Alves