This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: increase in object code size
- To: jason at cygnus dot com (Jason Merrill)
- Subject: Re: increase in object code size
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 23 Sep 1997 22:06:37 -0700 (PDT)
- Cc: rth at cygnus dot com, egcs at cygnus dot com
- Reply-To: rth at cygnus dot com (Richard Henderson)
> Not gon' happen, or not everywhere anyway. On the x86, SEGV screws up the
> stack. How do you unwind a signal handler?
On OSF/1 they do it by making the process context used by the
exception code the same as struct sigcontext that is passed into
the signal handler. Thus you do
int sighandler(int sig, siginfo_t *info, void *_c)
{
ucontext_t *context = (ucontext_t *)_c;
exc_raise_signal_exception(myexcptnr, mycode, &context->uc_mcontext);
}
So you actually start the unwind in the context the signal happened
in. It is pretty spiff, really. I'm of the opinion that we should
open up the internals of our exception handling in similar ways.
As for the lossage with try malloc catch free, well those are the
breaks. But there are other ways to use signals and exceptions that
are useful. Admittedly SEGV ans FPE are the best examples...
r~