This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: PPC / Unwinding non-call exceptions


Richard Henderson writes:
 > On Thu, May 17, 2001 at 05:18:37PM +0100, Andrew Haley wrote:
 > > 	* config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New.
 > 
 > > +    /* The unwinder expects the IP to point to the following insn,	\
 > > +       whereas the kernel returns the address of the actual		\
 > > +       faulting insn.  */						\
 > > +    sc_->regs->nip += 4;  						\
 > 
 > Always?  For instance on Alpha, SIGSEGV/SIGBUS point to the
 > faulting insn, while SIGFPE/SIGILL point to the following insn.

Right.  On Alpha, some of my SEGV test cases fail, but if I adjust the
saved pc to point to the following insn in the same way as the PPC
they pass.  So, it seems that it iss necessary to fix up the PC on
Alpha, but this needs to be done on a signal-dependent basis.

Do you have any suggestions about how to go about doing this?  In
MD_FALLBACK_FRAME_STATE_FOR we only have a sigcontext, and this
doesn't include the signo.  The signo is passed to the handler in a0,
of course, but I think that register won't get saved.

I can think of a fairly evil way to fix my problem (by patching the
saved PC in libgcj's SEGV signal handler) but I wondered if you might
have any better ideas.

Andrew.


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