This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: x86 EH on BSD/OS with snapshot gas not working..
> robertl> can manually enable it via the -fsjlj-exceptions flag to the gcc
> robertl> command line. If adding this flag to whatever eh torture test
> robertl> you were looking at makes it pass, then we can discuss either how
> robertl> to make this the default or how to figure out what's going on with
> robertl> the dwarf2 stuff.
>
> Bingo. It seems to be working now.
I actually understand very little of what's really going on in all
this, but I was in the same place in the OpenServer port a few months
ago, so the debugging technique was still fresh in my mind. :-)
If you want to make sjlj exceptions the default for your target,
just add
#define DWARF2_UNWIND_INFO 0
into whatever tm.h is used. This would be the thing
in gcc/config/i386 that describes whatever a BSD/OS is.
More information on this symbol is in gcc/tm.texi. Based on ten
seconds of digging, I do wonder if the doc in that file is accurate:
Otherwise, if your target supports this information (if it defines
@samp{INCOMING_RETURN_ADDR_RTX} and either @samp{UNALIGNED_INT_ASM_OP}
or @samp{OBJECT_FORMAT_ELF}), GCC will provide a default definition of
1.
I can't see where in defaults.h that OBJECT_FORMAT_ELF comes into
play.
If you actually want to fix dwarf2 unwinding on your target, I'll
leave that to the people that understand such things.
RJL