This is the mail archive of the
mailing list for the GCC project.
Re: Bad unwinder data for __kernel_sigtramp_rt64 in PPC 64 vDSO corrupts Condition Register
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Andrew Haley <aph-gcc at littlepinkcloud dot COM>, Benjamin Herrenschmuidt <benh at kernel dot crashing dot org>, gcc at gcc dot gnu dot org, Deepak Bhole <dbhole at redhat dot com>
- Date: Wed, 17 Oct 2007 12:58:09 +0930
- Subject: Re: Bad unwinder data for __kernel_sigtramp_rt64 in PPC 64 vDSO corrupts Condition Register
- References: <firstname.lastname@example.org> <20071016182155.GM2896@sunsite.mff.cuni.cz>
On Tue, Oct 16, 2007 at 08:21:55PM +0200, Jakub Jelinek wrote:
> On Tue, Oct 16, 2007 at 06:02:13PM +0100, Andrew Haley wrote:
> > The reason is that the unwinder data for CR in the vDSO is wrong. The
> > line that affects the CR is here in
> According to __builtin_init_dwarf_reg_size_table on ppc64-linux
> r0..r31, fp0..fp31, mq, lr, ctr, ap, vrsave, vscr, spe_acc, spefcsr, sfp
> are 64-bit, v0..v31 128-bit and cr0..cr7, xer 32-bit.
> So both kernel and gcc/config/rs6000/linux-unwind.h are wrong.
> > arch/powerpc/kernel/vdso64/sigtramp.S:
> > rsave (70, 38*RSIZE) /* cr */
> This should just be changed to
> /* Size of CR regs in DWARF unwind info. */
> #define CRSIZE 4
> rsave (70, 38*RSIZE + (RSIZE - CRSIZE)) /* cr */
> and similarly linux-unwind.h should do:
> fs->regs.reg[R_CR2].loc.offset = (long) ®s->ccr - new_cfa;
> /* CR? regs are just 32-bit and PPC is big-endian. */
> fs->regs.reg[R_CR2].loc.offset += sizeof (long) - 4;
This looks good to me. I don't think we can change the unwinder to
use a different size for cr as that would break unwinding through
normal stack frames that save cr.
Australia Development Lab, IBM