This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: FW: Java vs. Dwarf2 EH Unwinder
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: davidm at hpl dot hp dot com
- Cc: rth at redhat dot com, aph at redhat dot com, java at gcc dot gnu dot org, gcc at gcc dot gnu dot org, hans_boehm at hp dot com
- Date: Fri, 29 Mar 2002 16:12:22 +1200
- Subject: Re: FW: Java vs. Dwarf2 EH Unwinder
- References: <40700B4C02ABD5119F000090278766443BF139@hplex1.hpl.hp.com> <15523.53375.714774.671071@napali.hpl.hp.com>
>
>
> Andrew> Surely you'd need to pass the entire processor state to the
> Andrew> _Unwind_RaiseException() variant.
>
> Rich> Indeed. I would be willing to create a variant that took a
> Rich> sigcontext* or something.
>
That would be really good. Perhaps the unwinder could expose its
_Unwind_Context struct somehow and libjava could copy the registers into it.
> Andrew> This would only work if the kernel saved the entire processor
> Andrew> state in the sigcontext and then called the signal handler. This
> Andrew> does happen on some architectures, but not all, and therefore
> Andrew> it's not a totally general solution.
>
> Rich> There has to be enough information for the kernel to restore
> Rich> enough state. What do you have in mind as an example of
> Rich> not-enough-state being saved?
>
>For example, ia64 linux only saves the scratch registers on signal
>delivery. Thus, some preserved registers may live on the signal stack
>and you can't just short-circuit out of the signal handler.
>
OK, but it sounds like ia64 is something of a special case for
unwinding, and it doesn't have any problem with unwinding signal frames?
The motivation here is to get other platforms which use the dwarf2
unwinder working for Java - the ones that are working already can
continue to use their existing mechanism if it makes sense.
regards
Bryce.