From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24623 invoked by alias); 27 May 2014 12:22:36 -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 24609 invoked by uid 89); 27 May 2014 12:22:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 May 2014 12:22:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WpGOj-0004QP-RM from Yao_Qi@mentor.com ; Tue, 27 May 2014 05:22:29 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 27 May 2014 05:22:29 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Tue, 27 May 2014 05:22:23 -0700 Message-ID: <538482FD.3030104@codesourcery.com> Date: Tue, 27 May 2014 12:22:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Andreas Arnez 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> In-Reply-To: <877g5777zd.fsf@br87z6lw.de.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00664.txt.bz2 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. > /* 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. > > - 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. -- Yao (齐尧)