summaryrefslogtreecommitdiff
path: root/gcc/ada/s-mastop.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-mastop.ads')
-rw-r--r--gcc/ada/s-mastop.ads69
1 files changed, 2 insertions, 67 deletions
diff --git a/gcc/ada/s-mastop.ads b/gcc/ada/s-mastop.ads
index 8ee412c2ff1..95f0da5da8b 100644
--- a/gcc/ada/s-mastop.ads
+++ b/gcc/ada/s-mastop.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2001 Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2005 Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
@@ -36,7 +36,6 @@ pragma Polling (Off);
-- elaboration circularities with System.Exception_Tables.
with System.Storage_Elements;
-with System.Exceptions;
package System.Machine_State_Operations is
@@ -79,65 +78,11 @@ package System.Machine_State_Operations is
-- outer level, or some other frame for which no information can be
-- provided.
- procedure Pop_Frame
- (M : Machine_State;
- Info : System.Exceptions.Subprogram_Info_Type);
+ procedure Pop_Frame (M : Machine_State);
-- This procedure pops the machine state M so that it represents the
-- call point, as though the current subprogram had returned. It
-- changes only the value referenced by M, and does not affect
-- the current stack environment.
- --
- -- The Info parameter represents information generated by the backend
- -- (see description of Subprogram_Info node in sinfo.ads). This
- -- information is stored as static data during compilation. The
- -- caller then passes this information to Pop_Frame, which will
- -- use it to determine what must be changed in the machine state
- -- (e.g. which save-over-call registers must be restored, and from
- -- where on the stack frame they must be restored).
- --
- -- A value of No_Info for Info means either that the backend provided
- -- no information for current frame, or that the current frame is an
- -- other language frame for which no information exists, or that this
- -- is an outer level subprogram. In any case, Pop_Frame sets the code
- -- location to Null_Address when it pops past such a frame, and this
- -- is taken as an indication that the exception is unhandled.
-
- -- Note: at the current time, Info, if present is always a copy of
- -- the entry point of the procedure, as found by searching the
- -- subprogram table. For the case where a procedure is indeed in
- -- the table (either it is an Ada procedure, or a foreign procedure
- -- which is registered using pragma Propagate_Exceptions), then the
- -- entry point information will indeed be correct. It may well be
- -- possible for Pop_Frame to avoid using the Info parameter (for
- -- example if it consults auxiliary Dwarf tables to do its job).
- -- This is desirable if it can be done, because it means that it
- -- will work fine to propagate exceptions through unregistered
- -- foreign procedures. What will happen is that the search in the
- -- Ada subprogram table will find a junk entry. Even if this junk
- -- entry has an exception table, none of them will apply to the
- -- current location, so they will be ignored, and then Pop_Frame
- -- will be called to pop the frame. The Info parameter for this
- -- call will be junk, but if it is not used that does not matter.
- -- Note that the address recorded in the traceback table is of
- -- the exception location, so the traceback will be correct even
- -- in this case.
-
- procedure Enter_Handler
- (M : Machine_State;
- Handler : System.Exceptions.Handler_Loc);
- -- When Propagate_Handler locates an applicable exception handler, it
- -- calls Enter_Handler, passing it two parameters. The first is the
- -- machine state that corresponds to what is required for entry to
- -- the handler, as computed by repeated Pop_Frame calls to reach the
- -- handler to be entered. The second is the code location for the
- -- handler itself which is the address of the label at the start of
- -- the handler code.
- --
- -- Note: The machine state M is likely stored on the part of the
- -- stack that will be popped by the call, so care must be taken
- -- not to pop the stack until the Machine_State is entirely read.
- -- The value passed as Handler was obtained from elaboration of
- -- an N_Handler_Loc node by the backend.
function Fetch_Code (Loc : Code_Loc) return Code_Loc;
-- Some architectures (notably VMS) use a descriptor to describe
@@ -150,14 +95,4 @@ package System.Machine_State_Operations is
-- This routine sets M from the current machine state. It is called
-- when an exception is initially signalled to initialize the state.
- procedure Set_Signal_Machine_State
- (M : Machine_State;
- Context : System.Address);
- -- This routine sets M from the machine state that corresponds to the
- -- point in the code where a signal was raised. The parameter Context
- -- is a pointer to a structure created by the operating system when a
- -- signal is raised, and made available to the signal handler. The
- -- format of this context block, and the manner in which it is made
- -- available to the handler, are implementation dependent.
-
end System.Machine_State_Operations;