From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19267 invoked by alias); 31 Mar 2004 21:12:09 -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 19259 invoked from network); 31 Mar 2004 21:12:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 31 Mar 2004 21:12:07 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2VLC71X021048 for ; Wed, 31 Mar 2004 16:12:07 -0500 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2VH4Fj12481; Wed, 31 Mar 2004 12:04:16 -0500 To: gdb-patches@sources.redhat.com Subject: RFA: Don't assume gpr 0 is register number zero From: Jim Blandy Date: Wed, 31 Mar 2004 21:12: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: 2004-03/txt/msg00770.txt.bz2 2004-03-31 James Blandy * ppc-linux-nat.c (ppc_register_u_addr): Don't assume that r0 is register number zero. Index: gdb/ppc-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v retrieving revision 1.29 diff -c -r1.29 ppc-linux-nat.c *** gdb/ppc-linux-nat.c 15 Mar 2004 21:35:25 -0000 1.29 --- gdb/ppc-linux-nat.c 31 Mar 2004 15:23:24 -0000 *************** *** 133,139 **** /* General purpose registers occupy 1 slot each in the buffer */ if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) ! u_addr = ((PT_R0 + regno) * wordsize); /* Floating point regs: eight bytes each in both 32- and 64-bit ptrace interfaces. Thus, two slots each in 32-bit interface, one --- 133,139 ---- /* General purpose registers occupy 1 slot each in the buffer */ if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) ! u_addr = ((regno - tdep->ppc_gp0_regnum + PT_R0) * wordsize); /* Floating point regs: eight bytes each in both 32- and 64-bit ptrace interfaces. Thus, two slots each in 32-bit interface, one