Java vs. Dwarf2 EH Unwinder
Andrew Haley
aph@cambridge.redhat.com
Thu Mar 28 01:31:00 GMT 2002
Bryce McKinlay writes:
>
> Would it be possible to add another interface to the unwinder, a variant
> of _Unwind_RaiseException(), which takes an instruction pointer and
> frame pointer
Surely you'd need to pass the entire processor state to
the _Unwind_RaiseException() variant.
> as a context to begin unwinding from?
This would only work if the kernel saved the entire processor state in
the sigcontext and then called the signal handler. This does happen
on some architectures, but not all, and therefore it's not a totally
general solution.
A cleaner way (than what we do at present) of solving the problem of
needing to call the kernel to setup the sighandler might be this:
Have the unwinder recognize the *user* signal handler rather than the
sigreturn frame and unwind from that. This would simply jump over any
intervening frames, so we don't need co-operation from system
libraries. We'd need to add something to the handlers to force the
context to be saved in a way that the unwinder can recognize.
However, I guess this would also only work on architectures that save
the entire processor state before calling a sighandler.
Andrew.
More information about the Java
mailing list