From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26549 invoked by alias); 2 Mar 2012 10:49:47 -0000 Received: (qmail 26494 invoked by uid 22791); 2 Mar 2012 10:49:46 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Fri, 02 Mar 2012 10:49:29 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q22AnPTL019999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Mar 2012 05:49:25 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q22AnNZK003123; Fri, 2 Mar 2012 05:49:24 -0500 Message-ID: <4F50A5B3.8040806@redhat.com> Date: Fri, 02 Mar 2012 10:49:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] New field stop_pc in tracepoint_hit_ctx References: <1330650011-31899-1-git-send-email-yao@codesourcery.com> <1330650011-31899-2-git-send-email-yao@codesourcery.com> In-Reply-To: <1330650011-31899-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-03/txt/msg00076.txt.bz2 On 03/02/2012 01:00 AM, Yao Qi wrote: > This patch is to add a new field `stop_pc' in tracepoint_hit_ctx, so > parameter `stop_pc' used here and there can be removed. This change > allows us to give a clean interface in next patch. > > Note the name `tracepoint_hit_ctx' is not very accurate, because it > has been used in collect_data_at_step for "while-stepping" action also. > It may be renamed to `tracepoint_action_ctx', which is about the > context of doing tracepoint actions. I don't rename `tracepoint_hit_ctx' > to keep this patch as readable as possible. I can send a follow-up > patch to rename it if this change is reasonable. > > As `tracepoint_hit_ctx' is about the context of doing tracepoint > actions, it is natural to add field `stop_pc' to show the pc value when > to do tracepoint actions. Fine with me, though honestly I find that the similarity between tracepoint_action vs tracepoint_action_ctx will increase confusion, not reduce. > tpoint = ust_marker_to_static_tracepoint (mdata); > + ctx.base.stop_pc = tpoint->address; tpoint may be NULL, see just below. > + > if (tpoint == NULL) > { -- Pedro Alves