This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Throwing C++ exceptions from signal handlers
Yuval Kfir writes:
> > > is it possible to somehow convince gcc to properly throw an exception
> from a
> > > signal handler context?
> >
> > Yes, but only with synchronous exceptions like SIGSEGV and SIGFPE.
>
> That's good news - but how? How should I modify the sample program so that
> it won't abort with gcc? Or should I use different flags?
-fnon-call-exceptions Support synchronous non-call exceptions
This doesn't work on all architectures, and you might also need to do
some special work in the signal handlers. Look at libjava/include for
guidance.
Andrew.