From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32069 invoked by alias); 7 Jun 2003 00:01:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32037 invoked from network); 7 Jun 2003 00:01:39 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 7 Jun 2003 00:01:39 -0000 Received: by zenia.home (Postfix, from userid 5433) id DC3DC20FE6; Fri, 6 Jun 2003 19:02:09 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: [ppc64-linux]: Compute u-area offsets of FP registers correctly From: Jim Blandy Date: Sat, 07 Jun 2003 00:01:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00250.txt.bz2 2003-06-06 Jim Blandy * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area offsets for floating-point registers in both 32- and 64-bit interfaces. Index: gdb/ppc-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v retrieving revision 1.21.6.3 retrieving revision 1.21.6.4 diff -c -c -F'^(' -r1.21.6.3 -r1.21.6.4 *** gdb/ppc-linux-nat.c 28 May 2003 20:20:21 -0000 1.21.6.3 --- gdb/ppc-linux-nat.c 6 Jun 2003 06:59:02 -0000 1.21.6.4 *************** *** 133,141 **** if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) u_addr = ((PT_R0 + regno) * wordsize); ! /* Floating point regs: 2 slots each */ if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM) ! u_addr = ((PT_FPR0 + (regno - FP0_REGNUM) * 2) * 4); /* UISA special purpose registers: 1 slot each */ if (regno == PC_REGNUM) --- 133,143 ---- if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) u_addr = ((PT_R0 + regno) * wordsize); ! /* Floating point regs: eight bytes in both 32- and 64-bit ptrace ! interfaces. Thus, two slots each in 32-bit interface, one slot ! each in 64-bit interface. */ if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM) ! u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8); /* UISA special purpose registers: 1 slot each */ if (regno == PC_REGNUM)