diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-10 13:54:45 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-10 13:54:45 +0000 |
commit | d7f9727a15ecf7c7a4d5c26f4cb26ed40a5688a9 (patch) | |
tree | 260cb614852d6263229864541810297807d70342 /gcc/ada/s-tassta.adb | |
parent | ca67dc4da7cb2363cc63aa16ed19e4750580aba9 (diff) | |
download | gcc-d7f9727a15ecf7c7a4d5c26f4cb26ed40a5688a9.tar.gz |
* init.c (__gnat_initialize): Add a new parameter eh which contains the
address of the exception registration. The Win32 version of this
routine calls __gnat_install_SEH_handler() to initialize the SEH
(Structured Exception Handling) handler.
(__gnat_error_handler) [Win32]: Removed. Not needed as we use
SEH (Structured Exception Handling) now.
(__gnat_install_handler) [Win32]: Nothing to do now as we use SEH.
(__gnat_initialize for ppc-vxworks): Adjust comments and the
preprocessor condition protecting the call to the extra eh setup
subprogram, which is only available for the ppc target.
(__gnat_clear_exception_count): replaced reference to
variable taskIdCurrent by call to taskIdSelf(), cleaner.
* seh_init.c: New file.
* Make-lang.in: (GNAT_ADA_OBJS): Add seh_init.o.
(GNATBIND_OBJS): Idem.
* misc.c (gnat_parse_file): Update call to __gnat_initialize. This
routine takes a new parameter (a pointer to the exception registration
for the SEH (Structured Exception Handling) support.
* raise.h: (__gnat_install_SEH_handler): New prototype.
Update copyright notice.
* s-tassta.adb (Task_Wrapper): Declare the exception registration
record and initialize it by calling __gnat_install_SEH_handler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tassta.adb')
-rw-r--r-- | gcc/ada/s-tassta.adb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb index e09b6a56459..0355e61e4c5 100644 --- a/gcc/ada/s-tassta.adb +++ b/gcc/ada/s-tassta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2004, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -910,6 +910,13 @@ package body System.Tasking.Stages is Secondary_Stack_Address : System.Address := Secondary_Stack'Address; + SEH_Table : aliased SSE.Storage_Array (1 .. 8); + -- Structured Exception Registration table (2 words) + + procedure Install_SEH_Handler (Addr : System.Address); + pragma Import (C, Install_SEH_Handler, "__gnat_install_SEH_handler"); + -- Install the SEH (Structured Exception Handling) handler + begin pragma Assert (Self_ID.Deferral_Level = 1); @@ -930,6 +937,11 @@ package body System.Tasking.Stages is Enter_Task (Self_ID); + -- We setup the SEH (Structured Exception Handling) handler if supported + -- on the target. + + Install_SEH_Handler (SEH_Table'Address); + -- We lock RTS_Lock to wait for activator to finish activating -- the rest of the chain, so that everyone in the chain comes out -- in priority order. |