This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Don't assume gpr 0 is register number zero
- From: Jim Blandy <jimb at redhat dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 20 Apr 2004 16:12:30 -0500
- Subject: Re: RFA: Don't assume gpr 0 is register number zero
- References: <vt2fzbpeyp4.fsf@zenia.home>
Ping?
Jim Blandy <jimb@redhat.com> writes:
> 2004-03-31 James Blandy <jimb@redhat.com>
>
> * 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