- -------------------
- -- Enter_Handler --
- -------------------
-
- procedure Enter_Handler (M : Machine_State; Handler : Handler_Loc) is
- procedure Get_Invo_Context (
- Result : out Unsigned_Longword; -- return value
- Invo_Handle : Invo_Handle_Type;
- Invo_Context : out Invo_Context_Blk_Type);
-
- pragma Interface (External, Get_Invo_Context);
-
- pragma Import_Valued_Procedure (Get_Invo_Context, "LIB$GET_INVO_CONTEXT",
- (Unsigned_Longword, Invo_Handle_Type, Invo_Context_Blk_Type),
- (Value, Value, Reference));
-
- ICB : Invo_Context_Blk_Type;
-
- procedure Goto_Unwind (
- Status : out Cond_Value_Type; -- return value
- Target_Invo : Address := Address_Zero;
- Target_PC : Address := Address_Zero;
- New_R0 : Unsigned_Quadword := Unsigned_Quadword'Null_Parameter;
- New_R1 : Unsigned_Quadword := Unsigned_Quadword'Null_Parameter);
-
- pragma Interface (External, Goto_Unwind);
-
- pragma Import_Valued_Procedure
- (Goto_Unwind, "SYS$GOTO_UNWIND",
- (Cond_Value_Type, Address, Address,
- Unsigned_Quadword, Unsigned_Quadword),
- (Value, Reference, Reference,
- Reference, Reference));
-
- Status : Cond_Value_Type;
-
- begin
- Get_Invo_Context (Status, To_Invo_Handle_Access (M).all, ICB);
- Goto_Unwind
- (Status, System.Address (To_Invo_Handle_Access (M).all), Handler);
- end Enter_Handler;
-