pragma Polling (Off);
pragma Warnings (Off);
with System; use System;
with System.Standard_Library; use System.Standard_Library;
with System.Soft_Links; use System.Soft_Links;
with System.Machine_State_Operations; use System.Machine_State_Operations;
package body Ada.Exceptions is
procedure builtin_longjmp (buffer : Address; Flag : Integer);
pragma No_Return (builtin_longjmp);
pragma Import (C, builtin_longjmp, "_gnat_builtin_longjmp");
pragma Suppress (All_Checks);
Zero_Cost_Exceptions : Integer;
pragma Import (C, Zero_Cost_Exceptions, "__gl_zero_cost_exceptions");
procedure AAA;
procedure ZZZ;
Code_Address_For_AAA, Code_Address_For_ZZZ : System.Address;
procedure Call_Chain (Excep : EOA);
procedure Process_Raise_Exception
(E : Exception_Id;
From_Signal_Handler : Boolean);
pragma No_Return (Process_Raise_Exception);
procedure To_Stderr (S : String);
pragma Export (Ada, To_Stderr, "__gnat_to_stderr");
procedure To_Stderr (C : Character);
pragma Inline (To_Stderr);
pragma Export (Ada, To_Stderr, "__gnat_to_stderr_char");
package Exception_Data is
procedure Set_Exception_C_Msg
(Id : Exception_Id;
Msg1 : Big_String_Ptr;
Line : Integer := 0;
Msg2 : Big_String_Ptr := null);
procedure Set_Exception_Msg
(Id : Exception_Id;
Message : String);
function Exception_Information (X : Exception_Occurrence) return String;
function Tailored_Exception_Information
(X : Exception_Occurrence) return String;
pragma Export
(Ada, Tailored_Exception_Information,
"__gnat_tailored_exception_information");
end Exception_Data;
package Exception_Traces is
use Exception_Data;
procedure Notify_Handled_Exception;
pragma Export
(C, Notify_Handled_Exception, "__gnat_notify_handled_exception");
procedure Notify_Unhandled_Exception;
pragma Export
(C, Notify_Unhandled_Exception, "__gnat_notify_unhandled_exception");
procedure Unhandled_Exception_Terminate;
pragma No_Return (Unhandled_Exception_Terminate);
end Exception_Traces;
package Exception_Propagation is
use Exception_Traces;
procedure Setup_Exception
(Excep : EOA;
Current : EOA;
Reraised : Boolean := False);
procedure Propagate_Exception (From_Signal_Handler : Boolean);
pragma No_Return (Propagate_Exception);
end Exception_Propagation;
package Stream_Attributes is
function EId_To_String (X : Exception_Id) return String;
function String_To_EId (S : String) return Exception_Id;
function EO_To_String (X : Exception_Occurrence) return String;
function String_To_EO (S : String) return Exception_Occurrence;
end Stream_Attributes;
procedure Raise_Current_Excep (E : Exception_Id);
pragma No_Return (Raise_Current_Excep);
pragma Export (C, Raise_Current_Excep, "__gnat_raise_nodefer_with_msg");
procedure Raise_Exception_No_Defer
(E : Exception_Id; Message : String := "");
pragma Export
(Ada, Raise_Exception_No_Defer,
"ada__exceptions__raise_exception_no_defer");
pragma No_Return (Raise_Exception_No_Defer);
procedure Raise_With_Msg (E : Exception_Id);
pragma No_Return (Raise_With_Msg);
pragma Export (C, Raise_With_Msg, "__gnat_raise_with_msg");
procedure Raise_With_Location_And_Msg
(E : Exception_Id;
F : Big_String_Ptr;
L : Integer;
M : Big_String_Ptr := null);
pragma No_Return (Raise_With_Location_And_Msg);
procedure Raise_Constraint_Error
(File : Big_String_Ptr;
Line : Integer);
pragma No_Return (Raise_Constraint_Error);
pragma Export
(C, Raise_Constraint_Error, "__gnat_raise_constraint_error");
procedure Raise_Constraint_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr);
pragma No_Return (Raise_Constraint_Error_Msg);
pragma Export
(C, Raise_Constraint_Error_Msg, "__gnat_raise_constraint_error_msg");
procedure Raise_Program_Error
(File : Big_String_Ptr;
Line : Integer);
pragma No_Return (Raise_Program_Error);
pragma Export
(C, Raise_Program_Error, "__gnat_raise_program_error");
procedure Raise_Program_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr);
pragma No_Return (Raise_Program_Error_Msg);
pragma Export
(C, Raise_Program_Error_Msg, "__gnat_raise_program_error_msg");
procedure Raise_Storage_Error
(File : Big_String_Ptr;
Line : Integer);
pragma No_Return (Raise_Storage_Error);
pragma Export
(C, Raise_Storage_Error, "__gnat_raise_storage_error");
procedure Raise_Storage_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr);
pragma No_Return (Raise_Storage_Error_Msg);
pragma Export
(C, Raise_Storage_Error_Msg, "__gnat_raise_storage_error_msg");
procedure Reraise;
pragma No_Return (Reraise);
pragma Export (C, Reraise, "__gnat_reraise");
procedure Save_Occurrence_And_Private
(Target : out Exception_Occurrence;
Source : Exception_Occurrence);
procedure Save_Occurrence_No_Private
(Target : out Exception_Occurrence;
Source : Exception_Occurrence);
procedure Transfer_Occurrence
(Target : Exception_Occurrence_Access;
Source : Exception_Occurrence);
pragma Export (C, Transfer_Occurrence, "__gnat_transfer_occurrence");
procedure Rcheck_00 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_01 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_02 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_03 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_04 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_05 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_06 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_07 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_08 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_09 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_10 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_11 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_12 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_13 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_14 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_15 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_16 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_17 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_18 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_19 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_20 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_21 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_22 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_23 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_24 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_25 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_26 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_27 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_28 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_29 (File : Big_String_Ptr; Line : Integer);
procedure Rcheck_30 (File : Big_String_Ptr; Line : Integer);
pragma Export (C, Rcheck_00, "__gnat_rcheck_00");
pragma Export (C, Rcheck_01, "__gnat_rcheck_01");
pragma Export (C, Rcheck_02, "__gnat_rcheck_02");
pragma Export (C, Rcheck_03, "__gnat_rcheck_03");
pragma Export (C, Rcheck_04, "__gnat_rcheck_04");
pragma Export (C, Rcheck_05, "__gnat_rcheck_05");
pragma Export (C, Rcheck_06, "__gnat_rcheck_06");
pragma Export (C, Rcheck_07, "__gnat_rcheck_07");
pragma Export (C, Rcheck_08, "__gnat_rcheck_08");
pragma Export (C, Rcheck_09, "__gnat_rcheck_09");
pragma Export (C, Rcheck_10, "__gnat_rcheck_10");
pragma Export (C, Rcheck_11, "__gnat_rcheck_11");
pragma Export (C, Rcheck_12, "__gnat_rcheck_12");
pragma Export (C, Rcheck_13, "__gnat_rcheck_13");
pragma Export (C, Rcheck_14, "__gnat_rcheck_14");
pragma Export (C, Rcheck_15, "__gnat_rcheck_15");
pragma Export (C, Rcheck_16, "__gnat_rcheck_16");
pragma Export (C, Rcheck_17, "__gnat_rcheck_17");
pragma Export (C, Rcheck_18, "__gnat_rcheck_18");
pragma Export (C, Rcheck_19, "__gnat_rcheck_19");
pragma Export (C, Rcheck_20, "__gnat_rcheck_20");
pragma Export (C, Rcheck_21, "__gnat_rcheck_21");
pragma Export (C, Rcheck_22, "__gnat_rcheck_22");
pragma Export (C, Rcheck_23, "__gnat_rcheck_23");
pragma Export (C, Rcheck_24, "__gnat_rcheck_24");
pragma Export (C, Rcheck_25, "__gnat_rcheck_25");
pragma Export (C, Rcheck_26, "__gnat_rcheck_26");
pragma Export (C, Rcheck_27, "__gnat_rcheck_27");
pragma Export (C, Rcheck_28, "__gnat_rcheck_28");
pragma Export (C, Rcheck_29, "__gnat_rcheck_29");
pragma Export (C, Rcheck_30, "__gnat_rcheck_30");
pragma No_Return (Rcheck_00);
pragma No_Return (Rcheck_01);
pragma No_Return (Rcheck_02);
pragma No_Return (Rcheck_03);
pragma No_Return (Rcheck_04);
pragma No_Return (Rcheck_05);
pragma No_Return (Rcheck_06);
pragma No_Return (Rcheck_07);
pragma No_Return (Rcheck_08);
pragma No_Return (Rcheck_09);
pragma No_Return (Rcheck_10);
pragma No_Return (Rcheck_11);
pragma No_Return (Rcheck_12);
pragma No_Return (Rcheck_13);
pragma No_Return (Rcheck_14);
pragma No_Return (Rcheck_15);
pragma No_Return (Rcheck_16);
pragma No_Return (Rcheck_17);
pragma No_Return (Rcheck_18);
pragma No_Return (Rcheck_19);
pragma No_Return (Rcheck_20);
pragma No_Return (Rcheck_21);
pragma No_Return (Rcheck_22);
pragma No_Return (Rcheck_23);
pragma No_Return (Rcheck_24);
pragma No_Return (Rcheck_25);
pragma No_Return (Rcheck_26);
pragma No_Return (Rcheck_27);
pragma No_Return (Rcheck_28);
pragma No_Return (Rcheck_29);
pragma No_Return (Rcheck_30);
use ASCII;
Rmsg_00 : constant String := "access check failed" & NUL;
Rmsg_01 : constant String := "access parameter is null" & NUL;
Rmsg_02 : constant String := "discriminant check failed" & NUL;
Rmsg_03 : constant String := "divide by zero" & NUL;
Rmsg_04 : constant String := "explicit raise" & NUL;
Rmsg_05 : constant String := "index check failed" & NUL;
Rmsg_06 : constant String := "invalid data" & NUL;
Rmsg_07 : constant String := "length check failed" & NUL;
Rmsg_08 : constant String := "null-exclusion check failed" & NUL;
Rmsg_09 : constant String := "overflow check failed" & NUL;
Rmsg_10 : constant String := "partition check failed" & NUL;
Rmsg_11 : constant String := "range check failed" & NUL;
Rmsg_12 : constant String := "tag check failed" & NUL;
Rmsg_13 : constant String := "access before elaboration" & NUL;
Rmsg_14 : constant String := "accessibility check failed" & NUL;
Rmsg_15 : constant String := "all guards closed" & NUL;
Rmsg_16 : constant String := "duplicated entry address" & NUL;
Rmsg_17 : constant String := "explicit raise" & NUL;
Rmsg_18 : constant String := "finalize/adjust raised exception" & NUL;
Rmsg_19 : constant String := "misaligned address value" & NUL;
Rmsg_20 : constant String := "missing return" & NUL;
Rmsg_21 : constant String := "overlaid controlled object" & NUL;
Rmsg_22 : constant String := "potentially blocking operation" & NUL;
Rmsg_23 : constant String := "stubbed subprogram called" & NUL;
Rmsg_24 : constant String := "unchecked union restriction" & NUL;
Rmsg_25 : constant String := "illegal use of"
& " remote access-to-class-wide type, see RM E.4(18)" & NUL;
Rmsg_26 : constant String := "empty storage pool" & NUL;
Rmsg_27 : constant String := "explicit raise" & NUL;
Rmsg_28 : constant String := "infinite recursion" & NUL;
Rmsg_29 : constant String := "object too large" & NUL;
Rmsg_30 : constant String := "restriction violation" & NUL;
type Unsigned is mod 2 ** 32;
Counter : Unsigned := 0;
pragma Warnings (Off, Counter);
procedure Poll is separate;
procedure AAA is
begin
<<Start_Of_AAA>>
Code_Address_For_AAA := Start_Of_AAA'Address;
end AAA;
procedure Call_Chain (Excep : EOA) is separate;
function Current_Target_Exception return Exception_Occurrence is
begin
return Null_Occurrence;
end Current_Target_Exception;
function EId_To_String (X : Exception_Id) return String
renames Stream_Attributes.EId_To_String;
function EO_To_String (X : Exception_Occurrence) return String
renames Stream_Attributes.EO_To_String;
function Exception_Identity
(X : Exception_Occurrence)
return Exception_Id
is
begin
if X.Id = Null_Id then
raise Constraint_Error;
else
return X.Id;
end if;
end Exception_Identity;
function Exception_Information (X : Exception_Occurrence) return String is
begin
if X.Id = Null_Id then
raise Constraint_Error;
end if;
return Exception_Data.Exception_Information (X);
end Exception_Information;
function Exception_Message (X : Exception_Occurrence) return String is
begin
if X.Id = Null_Id then
raise Constraint_Error;
end if;
return X.Msg (1 .. X.Msg_Length);
end Exception_Message;
function Exception_Name (Id : Exception_Id) return String is
begin
if Id = null then
raise Constraint_Error;
end if;
return Id.Full_Name.all (1 .. Id.Name_Length - 1);
end Exception_Name;
function Exception_Name (X : Exception_Occurrence) return String is
begin
return Exception_Name (X.Id);
end Exception_Name;
function Exception_Name_Simple (X : Exception_Occurrence) return String is
Name : constant String := Exception_Name (X);
P : Natural;
begin
P := Name'Length;
while P > 1 loop
exit when Name (P - 1) = '.';
P := P - 1;
end loop;
declare
subtype Rname is String (1 .. Name'Length - P + 1);
begin
return Rname (Name (P .. Name'Length));
end;
end Exception_Name_Simple;
package body Exception_Data is separate;
package body Exception_Propagation is separate;
package body Exception_Traces is separate;
package body Stream_Attributes is separate;
procedure Process_Raise_Exception
(E : Exception_Id;
From_Signal_Handler : Boolean)
is
pragma Inspection_Point (E);
Jumpbuf_Ptr : constant Address := Get_Jmpbuf_Address.all;
Excep : EOA := Get_Current_Excep.all;
begin
if Zero_Cost_Exceptions /= 0 then
Exception_Propagation.Propagate_Exception (From_Signal_Handler);
else
Call_Chain (Excep);
if Jumpbuf_Ptr /= Null_Address then
if not Excep.Exception_Raised then
Excep.Exception_Raised := True;
Exception_Traces.Notify_Handled_Exception;
end if;
builtin_longjmp (Jumpbuf_Ptr, 1);
else
pragma Inspection_Point (E);
Exception_Traces.Notify_Unhandled_Exception;
Exception_Traces.Unhandled_Exception_Terminate;
end if;
end if;
end Process_Raise_Exception;
procedure Raise_Constraint_Error
(File : Big_String_Ptr;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Constraint_Error_Def'Access, File, Line);
end Raise_Constraint_Error;
procedure Raise_Constraint_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr)
is
begin
Raise_With_Location_And_Msg
(Constraint_Error_Def'Access, File, Line, Msg);
end Raise_Constraint_Error_Msg;
procedure Raise_Current_Excep (E : Exception_Id) is
pragma Inspection_Point (E);
begin
Process_Raise_Exception (E => E, From_Signal_Handler => False);
end Raise_Current_Excep;
procedure Raise_Exception
(E : Exception_Id;
Message : String := "")
is
begin
if E /= null then
Exception_Data.Set_Exception_Msg (E, Message);
Abort_Defer.all;
Raise_Current_Excep (E);
end if;
end Raise_Exception;
procedure Raise_Exception_Always
(E : Exception_Id;
Message : String := "")
is
begin
Exception_Data.Set_Exception_Msg (E, Message);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_Exception_Always;
procedure Raise_From_Signal_Handler
(E : Exception_Id;
M : Big_String_Ptr)
is
begin
Exception_Data.Set_Exception_C_Msg (E, M);
Abort_Defer.all;
Process_Raise_Exception (E => E, From_Signal_Handler => True);
end Raise_From_Signal_Handler;
procedure Raise_Program_Error
(File : Big_String_Ptr;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Program_Error_Def'Access, File, Line);
end Raise_Program_Error;
procedure Raise_Program_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr)
is
begin
Raise_With_Location_And_Msg
(Program_Error_Def'Access, File, Line, Msg);
end Raise_Program_Error_Msg;
procedure Raise_Storage_Error
(File : Big_String_Ptr;
Line : Integer)
is
begin
Raise_With_Location_And_Msg
(Storage_Error_Def'Access, File, Line);
end Raise_Storage_Error;
procedure Raise_Storage_Error_Msg
(File : Big_String_Ptr;
Line : Integer;
Msg : Big_String_Ptr)
is
begin
Raise_With_Location_And_Msg
(Storage_Error_Def'Access, File, Line, Msg);
end Raise_Storage_Error_Msg;
procedure Raise_With_Location_And_Msg
(E : Exception_Id;
F : Big_String_Ptr;
L : Integer;
M : Big_String_Ptr := null)
is
begin
Exception_Data.Set_Exception_C_Msg (E, F, L, M);
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_With_Location_And_Msg;
procedure Raise_With_Msg (E : Exception_Id) is
Excep : constant EOA := Get_Current_Excep.all;
begin
Exception_Propagation.Setup_Exception (Excep, Excep);
Excep.Exception_Raised := False;
Excep.Id := E;
Excep.Num_Tracebacks := 0;
Excep.Cleanup_Flag := False;
Excep.Pid := Local_Partition_ID;
Abort_Defer.all;
Raise_Current_Excep (E);
end Raise_With_Msg;
procedure Rcheck_00 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_00'Address));
end Rcheck_00;
procedure Rcheck_01 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_01'Address));
end Rcheck_01;
procedure Rcheck_02 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_02'Address));
end Rcheck_02;
procedure Rcheck_03 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_03'Address));
end Rcheck_03;
procedure Rcheck_04 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_04'Address));
end Rcheck_04;
procedure Rcheck_05 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_05'Address));
end Rcheck_05;
procedure Rcheck_06 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_06'Address));
end Rcheck_06;
procedure Rcheck_07 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_07'Address));
end Rcheck_07;
procedure Rcheck_08 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_08'Address));
end Rcheck_08;
procedure Rcheck_09 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_09'Address));
end Rcheck_09;
procedure Rcheck_10 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_10'Address));
end Rcheck_10;
procedure Rcheck_11 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_11'Address));
end Rcheck_11;
procedure Rcheck_12 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Constraint_Error_Msg (File, Line, To_Ptr (Rmsg_12'Address));
end Rcheck_12;
procedure Rcheck_13 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_13'Address));
end Rcheck_13;
procedure Rcheck_14 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_14'Address));
end Rcheck_14;
procedure Rcheck_15 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_15'Address));
end Rcheck_15;
procedure Rcheck_16 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_16'Address));
end Rcheck_16;
procedure Rcheck_17 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_17'Address));
end Rcheck_17;
procedure Rcheck_18 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_18'Address));
end Rcheck_18;
procedure Rcheck_19 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_19'Address));
end Rcheck_19;
procedure Rcheck_20 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_20'Address));
end Rcheck_20;
procedure Rcheck_21 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_21'Address));
end Rcheck_21;
procedure Rcheck_22 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_22'Address));
end Rcheck_22;
procedure Rcheck_23 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_23'Address));
end Rcheck_23;
procedure Rcheck_24 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_24'Address));
end Rcheck_24;
procedure Rcheck_25 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Program_Error_Msg (File, Line, To_Ptr (Rmsg_25'Address));
end Rcheck_25;
procedure Rcheck_26 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Storage_Error_Msg (File, Line, To_Ptr (Rmsg_26'Address));
end Rcheck_26;
procedure Rcheck_27 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Storage_Error_Msg (File, Line, To_Ptr (Rmsg_27'Address));
end Rcheck_27;
procedure Rcheck_28 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Storage_Error_Msg (File, Line, To_Ptr (Rmsg_28'Address));
end Rcheck_28;
procedure Rcheck_29 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Storage_Error_Msg (File, Line, To_Ptr (Rmsg_29'Address));
end Rcheck_29;
procedure Rcheck_30 (File : Big_String_Ptr; Line : Integer) is
begin
Raise_Storage_Error_Msg (File, Line, To_Ptr (Rmsg_30'Address));
end Rcheck_30;
procedure Reraise is
Excep : constant EOA := Get_Current_Excep.all;
begin
Abort_Defer.all;
Exception_Propagation.Setup_Exception (Excep, Excep, Reraised => True);
Raise_Current_Excep (Excep.Id);
end Reraise;
procedure Reraise_Occurrence (X : Exception_Occurrence) is
begin
if X.Id /= null then
Abort_Defer.all;
Exception_Propagation.Setup_Exception
(X'Unrestricted_Access, Get_Current_Excep.all, Reraised => True);
Save_Occurrence_No_Private (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end if;
end Reraise_Occurrence;
procedure Reraise_Occurrence_Always (X : Exception_Occurrence) is
begin
Abort_Defer.all;
Exception_Propagation.Setup_Exception
(X'Unrestricted_Access, Get_Current_Excep.all, Reraised => True);
Save_Occurrence_No_Private (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end Reraise_Occurrence_Always;
procedure Reraise_Occurrence_No_Defer (X : Exception_Occurrence) is
begin
Exception_Propagation.Setup_Exception
(X'Unrestricted_Access, Get_Current_Excep.all, Reraised => True);
Save_Occurrence_No_Private (Get_Current_Excep.all.all, X);
Raise_Current_Excep (X.Id);
end Reraise_Occurrence_No_Defer;
procedure Save_Occurrence
(Target : out Exception_Occurrence;
Source : Exception_Occurrence)
is
begin
Save_Occurrence_No_Private (Target, Source);
end Save_Occurrence;
function Save_Occurrence
(Source : Exception_Occurrence)
return EOA
is
Target : EOA := new Exception_Occurrence;
begin
Save_Occurrence (Target.all, Source);
return Target;
end Save_Occurrence;
procedure Save_Occurrence_And_Private
(Target : out Exception_Occurrence;
Source : Exception_Occurrence)
is
begin
Save_Occurrence_No_Private (Target, Source);
Target.Private_Data := Source.Private_Data;
end Save_Occurrence_And_Private;
procedure Save_Occurrence_No_Private
(Target : out Exception_Occurrence;
Source : Exception_Occurrence)
is
begin
Target.Id := Source.Id;
Target.Msg_Length := Source.Msg_Length;
Target.Num_Tracebacks := Source.Num_Tracebacks;
Target.Pid := Source.Pid;
Target.Cleanup_Flag := Source.Cleanup_Flag;
Target.Msg (1 .. Target.Msg_Length) :=
Source.Msg (1 .. Target.Msg_Length);
Target.Tracebacks (1 .. Target.Num_Tracebacks) :=
Source.Tracebacks (1 .. Target.Num_Tracebacks);
end Save_Occurrence_No_Private;
procedure Transfer_Occurrence
(Target : Exception_Occurrence_Access;
Source : Exception_Occurrence)
is
begin
Exception_Propagation.Setup_Exception (Target, Target);
Save_Occurrence_No_Private (Target.all, Source);
end Transfer_Occurrence;
function String_To_EId (S : String) return Exception_Id
renames Stream_Attributes.String_To_EId;
function String_To_EO (S : String) return Exception_Occurrence
renames Stream_Attributes.String_To_EO;
procedure Raise_Exception_No_Defer
(E : Exception_Id;
Message : String := "")
is
begin
Exception_Data.Set_Exception_Msg (E, Message);
Raise_Current_Excep (E);
end Raise_Exception_No_Defer;
procedure To_Stderr (C : Character) is
type int is new Integer;
procedure put_char_stderr (C : int);
pragma Import (C, put_char_stderr, "put_char_stderr");
begin
put_char_stderr (Character'Pos (C));
end To_Stderr;
procedure To_Stderr (S : String) is
begin
for J in S'Range loop
if S (J) /= ASCII.CR then
To_Stderr (S (J));
end if;
end loop;
end To_Stderr;
procedure ZZZ is
begin
<<Start_Of_ZZZ>>
Code_Address_For_ZZZ := Start_Of_ZZZ'Address;
end ZZZ;
begin
Set_Machine_State_Addr_NT (System.Address (Allocate_Machine_State));
AAA;
ZZZ;
end Ada.Exceptions;