controlling exception type per target

Robert Lipe robertl@dgii.com
Sun Sep 28 21:41:00 GMT 1997


On Sep 25, Robert Lipe wrote:
> I've been looking at the dwarf2 exception stuff and have a timid
> suggestion that I'd like some feedback on before I actually write
> the trivial (?) patch to do it.
> 
[ explanation of difficulties encountered with current scheme deleted ] 
> 
> Would it be reasonable to provide a line in, say, init_eh() that could
> override the constant initialization of exceptions_via_longjmp at the 
> top of exception.c?   Then we could stick something like
> 
> #define DEFAULT_SJLJ_EXCEPTION \
> 	(TARGET_ELF) ? 0 : 1 
> 
> in the affected targets.
> 
> In an appropriate place (init_eh()?) we could then say
> 
> #if defined (DEFAULT_SJLJ_EXCEPTION)
> 	exceptions_via_longjmp = DEFAULT_SJLJ_EXCEPTION ;
> #endif

In the silence that ensued, I did implement a variation this.   This 
allowed me to get all the library stuff built for both COFF (sjlj) and ELF 
(dwarf2unwind) but I then ran into problem with the crtstuff.c file
where it tried to do dwarf things when it shouldn't have (on this target).

Should I expand this scheme on into crtstuff as well?

If someone could give me a little guidance on what would be the 
preferred direction to go with this (there are a couple) I don't 
mind doing the coding and testing.    I just don't want to have
to do it twice...

Thanx,
RJL



More information about the Gcc mailing list