This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Java vs. Dwarf2 EH Unwinder
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Cc: java at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 28 Mar 2002 09:31:26 +0000 (GMT)
- Subject: Java vs. Dwarf2 EH Unwinder
- References: <3CA270FF.5090905@waitaki.otago.ac.nz>
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.