RFA: Don't assume gpr 0 is register number zero
Jim Blandy
jimb@redhat.com
Wed Mar 31 21:12:00 GMT 2004
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
More information about the Gdb-patches
mailing list