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]
Other format: [Raw text]

Re: BUG? -fomit-frame-pointer and exceptions or setjmp/longjmp


On Fri, 14 Jun 2002, Andrew Haley stipulated:
> Nix writes:
>  > Why is there a fallback function at all?
> 
> In order to unpick signal handler frames.  The idea is that if we fail
> to find information for the previous frame, we invoke an operating
> system specific fallback handler, which in turn recognizes a signal
> handler frame and unwinds through it.

Aah, hence the comments regarding `handlers' in unwind.inc. I see now.

Wow, ingenious. I'd assumed that throwing through signal handlers was a
no-hope-you're-dead case :) so there's nothing wrong with it and it's
tripping at the wrong moment because of an oversight in FDE generation,
then.

So all I need to do is learn how to read FDEs from the DWARF2 spec. I've
read enough to realise it's not *at all* simple; the sort of thing
that's better done with scripts to make sense of the info, even when
reading them from .S files

> If you've hit MD_FALLBACK_FRAME_STATE_FOR and there has been no signal
> it's a bug, as Richard said.

There's been no signal, and the problem is quite reproducible.
(*Reducing* it to a small testcase, though, is a bit of a swine.)

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'


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