FW: Java vs. Dwarf2 EH Unwinder
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Thu Mar 28 21:29:00 GMT 2002
>
>
> 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.
More information about the Gcc
mailing list