x86 EH on BSD/OS with snapshot gas not working..
Robert Lipe
robertl@dgii.com
Wed Jan 7 15:13:00 GMT 1998
> mrs> Have you tried reading the comments in gcc/except.c? It is meant to
> mrs> document EH in the compiler.
>
> I haven't tried code generator side. Okay, I will.
Actually, a reasonable punting place is to verify that sjlj exceptions
work correctly if you're thinking that the dwarf2 stuff is inoperational
on your target. Setjmp/longjmp exceptions tend to demand fewer things
be functional than the dwarf2 exception mechanism does.
How can you tell for sure which is in use? Feed a .C image to your
compiler and look at the generated assembly file. For example,
the following proves that my target uses sjlj exceptions only
for COFF:
$ gcc -S d.C ; head d.s
.file "d.C"
.version "01.01"
/ GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (i586-pc-sco3.2v5.0.4
) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
/ options passed:
/ options enabled: -fpeephole -ffunction-cse -fkeep-static-consts
/ -fpcc-struct-return -fexceptions -fcommon -fverbose-asm -fgnu-linker
/ -fargument-alias -m80387 -mhard-float -mno-soft-float -mieee-fp
/ -mfp-ret-in-387 -mschedule-prologue -mcpu=pentium -march=pentium
gcc2_compiled.:
(robertl) rjlhome:/tmp
$ gcc -mcoff -S d.C ; head d.s
.file "d.C"
.version "01.01"
/ GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (i586-pc-sco3.2v5.0.4
) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
/ options passed: -mcoff
/ options enabled: -fpeephole -ffunction-cse -fkeep-static-cons
/ -fpcc-struct-return -fexceptions -fsjlj-exceptions -fcommon -fverbose-asm
/ -fgnu-linker -fargument-alias -m80387 -mhard-float -mno-soft-float
/ -mieee-fp -mfp-ret-in-387 -mschedule-prologue -mcoff -mcpu=pentium
/ -march=pentium
If you can see that sjlj-exceptions isn't set on your target, you
can manually enable it via the -fsjlj-exceptions flag to the gcc
command line. If adding this flag to whatever eh torture test
you were looking at makes it pass, then we can discuss either how
to make this the default or how to figure out what's going on with
the dwarf2 stuff.
More information about the Gcc-bugs
mailing list