From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4143 invoked by alias); 26 Oct 2007 15:01:19 -0000 Received: (qmail 4128 invoked by uid 22791); 26 Oct 2007 15:01:16 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Oct 2007 15:01:14 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9QF1Cwh113934 for ; Fri, 26 Oct 2007 15:01:12 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9QF1B1w2187476 for ; Fri, 26 Oct 2007 17:01:11 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9QF1BdJ002048 for ; Fri, 26 Oct 2007 17:01:11 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l9QF1BII002037; Fri, 26 Oct 2007 17:01:11 +0200 Message-Id: <200710261501.l9QF1BII002037@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 26 Oct 2007 17:01:11 +0200 Subject: Re: [patch] Add support for PPC Altivec registers in core files To: cseo@linux.vnet.ibm.com (Carlos Eduardo Seo) Date: Fri, 26 Oct 2007 15:23:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches Mailing List) In-Reply-To: <4721F5C1.8060904@linux.vnet.ibm.com> from "Carlos Eduardo Seo" at Oct 26, 2007 12:12:17 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2007-10/txt/msg00714.txt.bz2 Carlos Eduardo Seo wrote: > Thanks for reviewing this. I've attached the updated patch. Thanks. There's still some minor issues I've pointed out below. Patch is OK with those fixed. > As for gcore, I'm not familiar with it. If you point out some > directions, I could do it as well. No problem. Have a look at linux_nat_do_thread_registers in linux-nat.c. This would need to be extended to write the Altivec register section where applicable. You may also need additional BFD support for this. Bye, Ulrich > + if ((regnum != tdep->ppc_vrsave_regnum) > + && (regnum != tdep->ppc_vrsave_regnum - 1)) Still superfluous parentheses ;-) > + ppc_supply_reg (regcache, regnum, vrregs, offset, 16); > + else if (regnum == (tdep->ppc_vrsave_regnum - 1)) > + ppc_supply_reg (regcache, regnum, > + vrregs, offset, 4); > + else > + ppc_supply_reg (regcache, regnum, > + vrregs, offset, 4); Now the middle "else if" is superfluous. > + offset = ppc_vrreg_offset (tdep, offsets, regnum); > + if ((regnum != tdep->ppc_vrsave_regnum) > + && (regnum != tdep->ppc_vrsave_regnum - 1)) > + ppc_collect_reg (regcache, regnum, vrregs, offset, 16); > + else if (regnum == (tdep->ppc_vrsave_regnum - 1)) > + ppc_collect_reg (regcache, regnum, > + vrregs, offset, 4); > + else > + ppc_collect_reg (regcache, regnum, > + vrregs, offset, 4); Same applies to this part. -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com