From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118697 invoked by alias); 18 Apr 2016 11:53:55 -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 118681 invoked by uid 89); 18 Apr 2016 11:53:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*o:Research, interpreting, Hx-languages-length:1144 X-HELO: e06smtp15.uk.ibm.com Received: from e06smtp15.uk.ibm.com (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 18 Apr 2016 11:53:54 +0000 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Apr 2016 12:53:50 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 18 Apr 2016 12:53:48 +0100 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id E86441B08067 for ; Mon, 18 Apr 2016 12:54:30 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u3IBrltY20643974 for ; Mon, 18 Apr 2016 11:53:47 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u3IBrkEF008891 for ; Mon, 18 Apr 2016 05:53:47 -0600 Received: from oc1027705133.ibm.com (dyn-9-152-212-180.boeblingen.de.ibm.com [9.152.212.180]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u3IBrjY3008811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2016 05:53:45 -0600 From: Andreas Arnez To: Pedro Alves Cc: Ulrich Weigand , gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [PATCH 2/2] Involve gdbarch in taking DWARF register pieces References: <20160415180943.4FEE857EE@oc7340732750.ibm.com> <571134CD.8080507@redhat.com> Date: Mon, 18 Apr 2016 11:53:00 -0000 In-Reply-To: <571134CD.8080507@redhat.com> (Pedro Alves's message of "Fri, 15 Apr 2016 19:37:01 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16041811-0021-0000-0000-0000335242DA X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00395.txt.bz2 On Fri, Apr 15 2016, Pedro Alves wrote: > Could we have some comment somewhere on what a "part" is? > > This comment isn't very enlightening, IMHO: > > +# Locate a part of size LEN within register *REGNUM, possibly overwriting > +# *REGNUM. Return the offset of the part within the (possibly adjusted) > +# register. > +m:int:register_part:int len, int *regnum:len, regnum::default_register_part::0 > > Reading this in isolation I have no idea what it's for. I skimmed the patch > and didn't find any. Sorry if it's there and I missed it. Hm, I used the word "part" to imply a slightly more general meaning than the DWARF term "piece". But that may actually be counterproductive... So how about renaming the method to "register_piece" and then adjusting the comment like this: Determine the placement of a DWARF piece (DW_OP_piece) of size LEN within register *REGNUM, possibly overwriting *REGNUM. Return the offset of the piece within the (possibly adjusted) register. This method also applies when interpreting a register as a LEN-sized type. Does this help? -- Andreas