From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86404 invoked by alias); 2 Aug 2018 16:58:42 -0000 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 Received: (qmail 86395 invoked by uid 89); 2 Aug 2018 16:58:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:gdbarch.h, gdbarchh, gdbarch.h X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Aug 2018 16:58:41 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w72Gdalr101740 for ; Thu, 2 Aug 2018 12:58:39 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2km5hs0xxh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 02 Aug 2018 12:58:39 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Aug 2018 17:58:37 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 2 Aug 2018 17:58:36 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w72GwYvD35848422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Aug 2018 16:58:34 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 07317AE045; Thu, 2 Aug 2018 19:58:34 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E8EABAE053; Thu, 2 Aug 2018 19:58:33 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.152.213.80]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 2 Aug 2018 19:58:33 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 4BA59D802AB; Thu, 2 Aug 2018 18:58:34 +0200 (CEST) Subject: Re: [PATCH v2 4/6] Use remote register numbers in tracepoint mask To: pedromfc@linux.ibm.com (Pedro Franco de Carvalho) Date: Thu, 02 Aug 2018 16:58:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20180727210318.2960-5-pedromfc@linux.ibm.com> from "Pedro Franco de Carvalho" at Jul 27, 2018 06:03:16 PM MIME-Version: 1.0 x-cbid: 18080216-4275-0000-0000-000002A2A29C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080216-4276-0000-0000-000037AABD6E Message-Id: <20180802165834.4BA59D802AB@oc3748833570.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-SW-Source: 2018-08/txt/msg00039.txt.bz2 Pedro Franco de Carvalho wrote: > Currently, tracepoint register masks in the QTDP packets include both > internal and remote register numbers, as well as pseudo-register > numbers. Yes, this looks like a bug to me. > Register numbers from agent expressions are already set in the mask > using remote numbers. Other tracepoint actions used internal numbers, > e.g. "collect $regs" or "collect $". To handle pseudoreg > numbers, an empty agent expression is created and ax_reg_mask is > called for this expression and the pseudoreg. This will cause the ax > to set its mask with the corresponding remote raw register > numbers (using gdbarch_ax_pseudo_register_collect). > > This assumes that all gdbarch_ax_pseudo_register_collect > implementations only use ax_reg_mask themselves to set the mask, and > don't generate more complicated agent expressions to collect > pseudoregs. This seems to be the case, and seems to be the intended > use of gdbarch_ax_pseudo_register_collect, despite the gdbarch.h > comment for this function. It would be good to update that comment then, if this behavior is now an actual requirement. The alternative I guess would be to have collect_symbol fall back to the "treat_as_expr" case for collecting pseudo registers; and then possibly implementing as optimization a check whether the agent expression is actually empty except for the register mask ... Something similar would then also have to be done in encode_actions_1. Do you think this would be doable? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com