This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ppc64-linux]: Compute u-area offsets of FP registers correctly


2003-06-06  Jim Blandy  <jimb@redhat.com>

	* 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]