From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 953 invoked by alias); 27 May 2014 14:21:13 -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 940 invoked by uid 89); 27 May 2014 14:21:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-SHA encrypted) ESMTPS; Tue, 27 May 2014 14:21:11 +0000 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 May 2014 15:21:08 +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; Tue, 27 May 2014 15:21:07 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id C7CAE1B08040 for ; Tue, 27 May 2014 15:21:26 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4REL61544957900 for ; Tue, 27 May 2014 14:21:06 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4REL6MQ032034 for ; Tue, 27 May 2014 08:21:06 -0600 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-188.boeblingen.de.ibm.com [9.152.212.188]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s4REL5C0031996; Tue, 27 May 2014 08:21:05 -0600 From: Andreas Arnez To: Yao Qi Cc: Subject: Re: [PATCH 01/12] regcache: Add functions suitable for regset_supply/collect. References: <1401122208-2481-1-git-send-email-arnez@linux.vnet.ibm.com> <1401122208-2481-2-git-send-email-arnez@linux.vnet.ibm.com> <5383FC9B.4040400@codesourcery.com> <877g5777zd.fsf@br87z6lw.de.ibm.com> <538482FD.3030104@codesourcery.com> Date: Tue, 27 May 2014 14:21:00 -0000 In-Reply-To: <538482FD.3030104@codesourcery.com> (Yao Qi's message of "Tue, 27 May 2014 20:20:13 +0800") Message-ID: <8738fv7166.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14052714-0342-0000-0000-000008ED9805 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00669.txt.bz2 On Tue, May 27 2014, Yao Qi wrote: > On 05/27/2014 07:53 PM, Andreas Arnez wrote: >> Correct. Maybe it's better to rephrase the whole comment like this: >> > > Yes, that is much better. Good -- thanks for pointing this out. > >> /* Mapping between register numbers and offsets in a buffer, for use >> in the '*regset' functions below. In an array of >> 'regcache_map_entry' each element is interpreted like follows: >> >> - If 'regno' is a register number: Map register 'regno' to the >> current offset (starting with 0) and increase the current offset >> by the register's size. Repeat this with consecutive register >> numbers up to 'regno+count-1'. >> >> - If 'regno' has the special value REGCACHE_MAP_SKIP_BYTES: Add >> 'count' to the current offset. > > Nit: I'd say "If 'regno' is REGCACHE_MAP_SKIP_BYTES, 'count' is the > increased offset". This is just my suggestion, which may be worse > than yours. I agree with simplifying the phrase "has the special value" to "is". For consistency I'd like to stick to the term "current offset" from the previous bullet. Also, I intentionally avoid saying "increase", because the current implementation allows 'count' to be negative. So I'll just shorten to: If 'regno' is REGCACHE_MAP_SKIP_BYTES: Add 'count' to the current offset. > >> >> - If count=0: End of the map. */ >> >>> > >>>> >> +/* Transfer a set of registers (as described by REGSET) between >>>> >> + REGCACHE and BUF. If REGNUM == -1, transfer all registers >>>> >> + belonging to the regset, otherwise just the register numbered >>>> >> + REGNUM. The REGSET's 'descr' field must point to an array of >>>> >> + 'struct regcache_map_entry'. >>> > >>> > IWBN to update the comments to 'descr' field, and go a step further, >>> > rename field 'descr'. >> With the new name being something like 'map' or 'regmap', I guess? If >> that's what you mean, I tend to agree, and I could provide a separate >> patch for that. >> > > 'regmap' sounds good to me. I don't have other comments. OK, I'll post a separate patch for that.