public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* controlling exception type per target
@ 1997-09-25 10:31 Robert Lipe
  1997-09-28 21:41 ` Robert Lipe
       [not found] ` <19970928233930.41615.cygnus.egcs@dgii.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Lipe @ 1997-09-25 10:31 UTC (permalink / raw)
  To: egcs

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.

EGCS on OpenServer generates either COFF or ELF.   For ELF, we want
DWARF2 exception handling because that's what the people that know
about such things say we want.   For COFF, we run into two problems 
with the native assembler.

1) The section names are too long.   I have submitted a patch to cure
   this.

2) The DWARF2 stuff (reasonably) expects an assembler that can handle
   forward references.   

Since DWARF and COFF don't go together (right?) does it make more sense 
for us to just set 'exceptions_via_longjmp' if we're emitting COFF?   
Some preliminary poking around in the 924 snapshot shows that if I just
set this variable either via the debugger or via -fsjlj-exceptions while
generating COFF, we don't trigger the lameness in the assembler which 
eliminates both of the above problems.

To do this, we need a way that the target files (ala sco5.h) can whack
this variable at runtime.   

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

We can't do it where this variable is now being set becuase it has
to be a constant.

Is there a better way to do this?    It looks like resetting it 
in init_eh() works for at least the trivial case.

Thanx in advance.

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Patches for egcs/OSR5 Was: controlling exception type per target
@ 1997-10-02 11:08 Mike Stump
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Stump @ 1997-10-02 11:08 UTC (permalink / raw)
  To: jason, robertl; +Cc: egcs

Excellent progress!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-10-02 11:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-25 10:31 controlling exception type per target Robert Lipe
1997-09-28 21:41 ` Robert Lipe
     [not found] ` <19970928233930.41615.cygnus.egcs@dgii.com>
1997-10-01 19:22   ` Jason Merrill
1997-10-01 23:00     ` Patches for egcs/OSR5 Was: " Robert Lipe
1997-10-01 23:33       ` Jason Merrill
1997-10-02 11:08 Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).