From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16793 invoked by alias); 20 Jun 2018 21:09:22 -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 16772 invoked by uid 89); 20 Jun 2018 21:09:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=packet, his 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; Wed, 20 Jun 2018 21:09:20 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5KL4hs1084893 for ; Wed, 20 Jun 2018 17:09:18 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jqxh2g4me-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Jun 2018 17:09:18 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Jun 2018 15:09:17 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 20 Jun 2018 15:09:16 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5KL9ESn21954962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 Jun 2018 14:09:14 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E85ACC605A; Wed, 20 Jun 2018 15:09:13 -0600 (MDT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AB6C8C6057; Wed, 20 Jun 2018 15:09:13 -0600 (MDT) Received: from pedro.localdomain (unknown [9.18.235.95]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 20 Jun 2018 15:09:13 -0600 (MDT) Received: by pedro.localdomain (Postfix, from userid 1000) id E4FD13C03AC; Wed, 20 Jun 2018 18:09:10 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com Subject: [PATCH 0/4] Allow larger sizes for tracepoint register masks Date: Wed, 20 Jun 2018 21:09:00 -0000 X-TM-AS-GCONF: 00 x-cbid: 18062021-0036-0000-0000-00000A018CF0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009229; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000265; SDB=6.01049878; UDB=6.00537991; IPR=6.00828851; MB=3.00021765; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-20 21:09:17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062021-0037-0000-0000-000047CF9A46 Message-Id: <20180620210855.6385-1-pedromfc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-20_09:,, signatures=0 X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00501.txt.bz2 Currently, the size of the register mask for tracepoint action packets is limited to 32 bytes, due to the size of an internal array. This patch series changes the array to a vector so that it can be sized according to the number of registers in the arch. The motivation for this is that I'm working on enabling additional registers for powerpc, and there are more registers that can be represented with the current mask size, so actions like "collect $regs" don't work. The series also changes the remote target to use the remote packet size when sending tracepoint packets, because with larger masks it no longer can be assumed that the mask will fit in a packet. Patches 1-2 fix minor issues in remote_target::download_tracepoint, so that patch 3 can change the method to use the remote packet size. Patch 1 fixes an indentation error, and patch 2 fixes an error that caused the last QTDP action packet to include the '-' trailing indicator for additional action packets. Patch 3 uses the remote packet size for the buffer used to build the QTDP packets and changes all writes to this buffer to xsnprintf. Patch 4 changes collection_list to build a variable-sized register mask. I also noticed that collection_list sometimes uses local register numbers, and sometimes remote register numbers to set the bits in the register mask, and allows pseudoregister numbers to be set in the mask, but his issue isn't fixed in this series. Pedro Franco de Carvalho (4): Fix indentation in remote_target::download_tracepoint Remove trailing '-' from the last QTDP action packet Use get_remote_packet_size in download_tracepoint Variable size for regs mask in collection list gdb/remote.c | 102 ++++++++++++++++++++++++++++++++----------------------- gdb/tracepoint.c | 28 +++++++++++---- gdb/tracepoint.h | 2 +- 3 files changed, 82 insertions(+), 50 deletions(-) -- 2.13.6