From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21824 invoked by alias); 18 Apr 2016 15:02:35 -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 21809 invoked by uid 89); 18 Apr 2016 15:02:34 -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= 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 15:02:32 +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 16:02:28 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) 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 16:02:19 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4FB0C17D8056 for ; Mon, 18 Apr 2016 16:03:05 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u3IF2I0E5112106 for ; Mon, 18 Apr 2016 15:02:18 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 u3IF2GWn014939 for ; Mon, 18 Apr 2016 09:02:17 -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 u3IF2Cke014626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2016 09:02:13 -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> <5714E6EA.8050905@redhat.com> Date: Mon, 18 Apr 2016 15:02:00 -0000 In-Reply-To: <5714E6EA.8050905@redhat.com> (Pedro Alves's message of "Mon, 18 Apr 2016 14:53:46 +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: 16041815-0021-0000-0000-0000335604AB X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00406.txt.bz2 On Mon, Apr 18 2016, Pedro Alves wrote: > On 04/18/2016 12:53 PM, Andreas Arnez wrote: >> 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? > > Yes, it does. Thanks. OK. Now, reading this again, it seems to me that I should better add the following disclaimer at the end: ... This method also applies when interpreting a register as a LEN-sized type, except when convert_register_p indicates that a special conversion is required instead. Still OK? > I'd suggest even calling it "dwarf_register_piece_placement" for > caller clarity? Sure, but I find a name like 'gdbarch_dwarf_register_piece_placement' a bit too unwieldy when trying to stick to an 80 char line size limit. Maybe 'gdbarch_register_piece_placement'? -- Andreas