This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Providing the start context for a raise ?


On Mon, Jul 16, 2001 at 07:00:54PM +0200, Olivier Hainque wrote:
> Our previous scheme was basically setting up a handler for this signal, which
> gets information about the machine state at the point where the signal has
> been sent and propagates an exception *from this recovered state*.

There is some provision in the current unwinder for systems
to provide the extra knowledge to unwind through a signal.

Ignoring some other complications for the moment, assuming
this was flushed out for all systems, you'd be able to just 
throw from the signal handler.

Java is using this for throwing NullPointerException and the like.

Now, it turns out that some systems (like Solaris) make it difficult
to write this extra bit of code for the unwinder.  I've discussed
privately with Andrew Haley a dwarf2 extension that would record where
the sigcontext is stored in a frame, which would allow propagation
to continue as if from the stored state.  I havn't found the time to
get around to it yet, but it's desired for 3.0.1.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]