This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: patch: signal trampoline frame cache corruption (repost?)
- From: PAUL GILLIAM <pgilliam at us dot ibm dot com>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 03 Nov 2006 09:50:36 -0800
- Subject: Re: patch: signal trampoline frame cache corruption (repost?)
- References: <1162323227.3428.9.camel@dufur.beaverton.ibm.com> <200610312328.k9VNScRC012608@elgar.sibelius.xs4all.nl>
- Reply-to: pgilliam at us dot ibm dot com
On Wed, 2006-11-01 at 00:28 +0100, Mark Kettenis wrote:
> > . . .
> > Ok to commit? (This is almost an obvious fix, isn't it?)
>
> Not as you've posted it, since it doesn't adhere to the GNU coding
> style. But the idea seems alright to me.
>
> Mark
Ufda!
Sorry about the formatting. I fixed that, and included a ChangeLog
entry which I also forgot the first time.
Now is it OK to commit?
-=# Paul #=-
2006-11-03 Paul Gilliam <pgilliam@us.ibm.com>
* ppc-linux-tdep.c (ppc_linux_sigtramp_cache): Only
deal with the floating point registers if the processor
has a floating point unit.
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 3 Nov 2006 17:45:28 -0000
@@ -916,14 +916,18 @@
trad_frame_set_reg_addr (this_cache, tdep->ppc_cr_regnum,
gpregs + 38 * tdep->wordsize);
- /* Floating point registers. */
- for (i = 0; i < 32; i++)
+ if (ppc_floating_point_unit_p(gdbarch))
{
- int regnum = i + FP0_REGNUM;
- trad_frame_set_reg_addr (this_cache, regnum, fpregs + i * 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);
}
- 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));
}