This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [commit] signal trampoline frame cache corruption


I don't know what happened.  I fixed the indentation problems introduced
by the patch.  
I  have attached the original patch it's self, with correct indentation.

-=# Paul #=-


2006-10-31  Paul Gilliam  <pgilliam@us.ibm.com>
        * ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Don't futz with
        the floating point registers if there aren't any.

Index: ppc-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v
retrieving revision 1.78
diff -a -u -r1.78 ppc-linux-tdep.c
--- ppc-linux-tdep.c	18 Apr 2006 19:20:06 -0000	1.78
+++ ppc-linux-tdep.c	31 Oct 2006 19:30:12 -0000
@@ -916,14 +916,16 @@
   trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum,
 			   gpregs + 38 * tdep->wordsize);
 
-  /* Floating point registers.  */
-  for (i = 0; i < 32; i++)
-    {
-      int regnum = i + FP0_REGNUM;
-      trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * tdep->wordsize);
-    }
-  trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
-			   fpregs + 32 * tdep->wordsize);
+  if (ppc_floating_point_unit_p (gdbarch))
+    {
+      /* Floating point registers.  */
+      for (i = 0; i < 32; i++)
+	{
+	  int regnum = i + FP0_REGNUM;
+	  trad_frame_set_reg_addr (this_cache, regnum,
+	                           fpregs + i * tdep->wordsize);
+	}
+      trad_frame_set_reg_addr (this_cache, tdep->ppc_fpscr_regnum,
+                               fpregs + 32 * tdep->wordsize);
+    }
   trad_frame_set_id (this_cache, frame_id_build (base, func));
 }
 

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