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]

RFA: put fpscr in right place in core file


This fixes a failure in gcore.exp.

2004-02-29  Jim Blandy  <jimb@redhat.com>

	* ppc-linux-nat.c (fill_fpregset): Place the 32-bit value of the
	fpscr in the right end of the 64-bit slot for it in the fpregset
	array.

Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/ppc-linux-nat.c,v
retrieving revision 2.19.6.4
diff -c -r2.19.6.4 ppc-linux-nat.c
*** gdb/ppc-linux-nat.c	29 Feb 2004 07:51:24 -0000	2.19.6.4
--- gdb/ppc-linux-nat.c	1 Mar 2004 04:51:15 -0000
***************
*** 1032,1038 ****
  	regcache_collect (FP0_REGNUM + regi, (char *) (*fpregsetp + regi));
      }
    if ((regno == -1) || regno == tdep->ppc_fpscr_regnum)
!     regcache_collect (tdep->ppc_fpscr_regnum, (char *) (*fpregsetp + regi));
  }
  
  
--- 1032,1044 ----
  	regcache_collect (FP0_REGNUM + regi, (char *) (*fpregsetp + regi));
      }
    if ((regno == -1) || regno == tdep->ppc_fpscr_regnum)
!     {
!       /* The FPSCR is stored in the low order word of the last
!          doubleword in the fpregset.  */
!       int offset = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? 4 : 0;
!       regcache_collect (tdep->ppc_fpscr_regnum,
!                         (char *) (*fpregsetp + regi) + offset);
!     }
  }
  
  


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