From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21786 invoked by alias); 27 May 2014 02:15:30 -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 21385 invoked by uid 89); 27 May 2014 02:14:48 -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 02:14:46 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wp6uZ-0006U0-Fu from Yao_Qi@mentor.com ; Mon, 26 May 2014 19:14:43 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 26 May 2014 19:14:43 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 26 May 2014 19:14:42 -0700 Message-ID: <5383F489.1010207@codesourcery.com> Date: Tue, 27 May 2014 02:15: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 , Subject: Re: [PATCH 08/12] NIOS2 Linux: Fill 'collect_regset' in regset structure. References: <1401122208-2481-1-git-send-email-arnez@linux.vnet.ibm.com> <1401122208-2481-9-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1401122208-2481-9-git-send-email-arnez@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00643.txt.bz2 On 05/27/2014 12:36 AM, Andreas Arnez wrote: > +#define NIOS2_GREGS_SIZE (4 * 31) > + Is it used? > /* Implement the supply_regset hook for core files. */ > > static void > @@ -73,11 +75,26 @@ nios2_supply_gregset (const struct regset *regset, > } > } > > +static void > +nios2_collect_gregset (const struct regset *regset, > + const struct regcache *regcache, > + int regnum, void *gregs_buf, size_t len) The comment to this function is needed, like the comment to nios2_supply_gregset. > +{ > + gdb_byte *gregs = gregs_buf; > + int regno; > + > + for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++) > + if (regnum == -1 || regnum == regno) > + { > + if (reg_offsets[regno] != -1) > + regcache_raw_collect (regcache, regno, > + gregs + 4 * reg_offsets[regno]); > + } > +} > + > static const struct regset nios2_core_regset = > { > - NULL, > - nios2_supply_gregset, > - NULL, > + NULL, nios2_supply_gregset, nios2_collect_gregset > }; I'd like to put each field in one line. Otherwise, it is OK. -- Yao (齐尧)