PPC / Unwinding non-call exceptions
Andrew Haley
aph@cambridge.redhat.com
Fri May 18 06:02:00 GMT 2001
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.
>
> Ok.
>
> > + /* 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.
"For all program exceptions except floating-point enabled exceptions
when operating in imprecise mode, SRR0 contains the EA of the
excepting instruction."
I haven't tried all the possibilites, but as far as I can tell the
kernel doesn't adjust SRR0 before passing the IP value to user code.
Andrew.
More information about the Gcc-patches
mailing list