summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-except.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-16 12:51:41 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-16 12:51:41 +0000
commit9f6613395c8d087729fdf8cd7b9840bbc3e06591 (patch)
tree519b73a3579b0657a1ff1d6be8e64614831db7cd /gcc/ada/a-except.adb
parentb62cafaaf073f368337f4c5ba3319c4e739fa1fe (diff)
downloadppe42-gcc-9f6613395c8d087729fdf8cd7b9840bbc3e06591.tar.gz
ppe42-gcc-9f6613395c8d087729fdf8cd7b9840bbc3e06591.zip
2012-07-16 Robert Dewar <dewar@adacore.com>
* freeze.adb, g-debpoo.adb, exp_ch3.adb: Minor reformatting. 2012-07-16 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c: Add definitions of E2BIG and EILSEQ. 2012-07-16 Tristan Gingold <gingold@adacore.com> * a-exexpr.adb (Propagate_Continue): New function replacing Raise_Current_Excep. (Allocate_Occurrence): New function. (Propagate_Exception): Add Excep parameter, remove call to Call_Chain. * a-exexpr-gcc.adb (GNAT_GCC_Exception): Occurrence component is now aliased. (To_GCC_Exception): Convert from Address. (Allocate_Occurrence): Allocate an Unwind exception occurrence. (Setup_Current_Excep): Fill the machine occurrence in case of foreign exception. (Propagate_Exception): Add Excep parameter, remove call to Call_Chain. * a-except.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer): Adjust calls to the above procedures. (Raise_From_Signal_Handler, Raise_With_Location_And_Msg) (Rcheck_PE_Finalize_Raised_Exception): Likewise. * a-except-2005.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. (Propagate_Exception): Likewise. (Allocate_Occurrence): New function. (Raise_Current_Excep): Removed. (Complete_Occurrence): New function to save the call chain. (Complete_And_Propagate_Occurrence): New procedure. (Create_Occurrence_From_Signal_Handler): New function to build an occurrence without propagating it. (Create_Machine_Occurrence_From_Signal_Handler): Likewise, but return the machine occurrence. (Raise_From_Signal_Handler): Use Create_Occurrence_From_Signal_Handler. (Raise_Exception, Raise_Exception_Always, Raise_Exception_No_Defer): Adjust calls to the above procedures. Allocate the occurrence at the beginning. (Raise_With_Location_And_Msg, Raise_With_Msg) (Rcheck_PE_Finalize_Raised_Exceptionm Reraise): Likewise. (Reraise_Occurrence): Use Reraise_Occurrence_Always. (Reraise_Occurrence_Always): Use Reraise_Occurrence_No_Defer. (Reraise_Occurrence_No_Defer): Preserve machine occurrence. (Save_Occurrence): Do not save machine occurrence. * a-except-2005.ads (Exception_Occurrence): Add Machine_Occurrence component. (Null_Occurrence): Consider it. * a-exexda.adb (Set_Exception_C_Msg, Set_Exception_Msg): add Excep parameter. 2012-07-16 Tristan Gingold <gingold@adacore.com> * seh_init.c (__gnat_map_SEH): New function extracted from __gnat_SEH_error_handler. * raise-gcc.c: __gnat_personality_seh0: Directly transforms Windows system exception into GCC one when possible, in order to save stack room (particularly useful when Storage_Error will be propagated). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189530 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except.adb')
-rw-r--r--gcc/ada/a-except.adb31
1 files changed, 19 insertions, 12 deletions
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb
index 6c05b6e6482..1201ab0a443 100644
--- a/gcc/ada/a-except.adb
+++ b/gcc/ada/a-except.adb
@@ -93,7 +93,8 @@ package body Ada.Exceptions is
---------------------------------
procedure Set_Exception_C_Msg
- (Id : Exception_Id;
+ (Excep : EOA;
+ Id : Exception_Id;
Msg1 : System.Address;
Line : Integer := 0;
Column : Integer := 0;
@@ -107,7 +108,8 @@ package body Ada.Exceptions is
-- additional null terminated string is added to the message.
procedure Set_Exception_Msg
- (Id : Exception_Id;
+ (Excep : EOA;
+ Id : Exception_Id;
Message : String);
-- This routine is called to setup the exception referenced by the
-- Current_Excep field in the TSD to contain the indicated Id value and
@@ -966,8 +968,8 @@ package body Ada.Exceptions is
(E : Exception_Id;
Message : String := "")
is
- EF : Exception_Id := E;
-
+ EF : Exception_Id := E;
+ Excep : constant EOA := Get_Current_Excep.all;
begin
-- Raise CE if E = Null_ID (AI-446)
@@ -977,7 +979,7 @@ package body Ada.Exceptions is
-- Go ahead and raise appropriate exception
- Exception_Data.Set_Exception_Msg (EF, Message);
+ Exception_Data.Set_Exception_Msg (Excep, EF, Message);
Abort_Defer.all;
Raise_Current_Excep (EF);
end Raise_Exception;
@@ -990,8 +992,9 @@ package body Ada.Exceptions is
(E : Exception_Id;
Message : String := "")
is
+ Excep : constant EOA := Get_Current_Excep.all;
begin
- Exception_Data.Set_Exception_Msg (E, Message);
+ Exception_Data.Set_Exception_Msg (Excep, E, Message);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_Exception_Always;
@@ -1004,8 +1007,9 @@ package body Ada.Exceptions is
(E : Exception_Id;
Message : String := "")
is
+ Excep : constant EOA := Get_Current_Excep.all;
begin
- Exception_Data.Set_Exception_Msg (E, Message);
+ Exception_Data.Set_Exception_Msg (Excep, E, Message);
-- Do not call Abort_Defer.all, as specified by the spec
@@ -1065,8 +1069,9 @@ package body Ada.Exceptions is
(E : Exception_Id;
M : System.Address)
is
+ Excep : constant EOA := Get_Current_Excep.all;
begin
- Exception_Data.Set_Exception_C_Msg (E, M);
+ Exception_Data.Set_Exception_C_Msg (Excep, E, M);
Abort_Defer.all;
Process_Raise_Exception (E);
end Raise_From_Signal_Handler;
@@ -1135,8 +1140,9 @@ package body Ada.Exceptions is
L : Integer;
M : System.Address := System.Null_Address)
is
+ Excep : constant EOA := Get_Current_Excep.all;
begin
- Exception_Data.Set_Exception_C_Msg (E, F, L, Msg2 => M);
+ Exception_Data.Set_Exception_C_Msg (Excep, E, F, L, Msg2 => M);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_With_Location_And_Msg;
@@ -1402,8 +1408,8 @@ package body Ada.Exceptions is
procedure Rcheck_PE_Finalize_Raised_Exception
(File : System.Address; Line : Integer)
is
- E : constant Exception_Id := Program_Error_Def'Access;
-
+ E : constant Exception_Id := Program_Error_Def'Access;
+ Excep : constant EOA := Get_Current_Excep.all;
begin
-- This is "finalize/adjust raised exception". This subprogram is always
-- called with abort deferred, unlike all other Rcheck_* routines, it
@@ -1411,7 +1417,8 @@ package body Ada.Exceptions is
-- This is consistent with Raise_From_Controlled_Operation
- Exception_Data.Set_Exception_C_Msg (E, File, Line, 0, Rmsg_22'Address);
+ Exception_Data.Set_Exception_C_Msg (Excep, E, File, Line, 0,
+ Rmsg_22'Address);
Raise_Current_Excep (E);
end Rcheck_PE_Finalize_Raised_Exception;
OpenPOWER on IntegriCloud