DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦727cc6504⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package V_I_Except, seg_0509be

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code




-- Copyright 1992 Verdix Corporation

------------------------------------------------------------------------------
-- User interface to Ada exception services.
--
-- Services for:
--  [1] getting the id and pc of the current Ada exception
--  [2] returning the string name of an exception id
--  [3] installing a callout to be called whenever an exception is raised
--
-- Unix self-hosts (using VADS_MICRO) also have core dump services to:
--  [1] produce a "core" file from anywhere in your program
--  [2] enable the generation of a "core" file for an unhandled Ada
--      exception
--  [3] enable exception traceback regs to be saved for a unhandled core dump
------------------------------------------------------------------------------
with System;
use System;
package V_I_Except is

    pragma Suppress (All_Checks);
    pragma Suppress (Exception_Tables);
    pragma Not_Elaborated;

    ----------------------------------------------------------------------
    -- Get the id and the pc of the current exception. If called outside
    -- of an Ada exception handler, then, information for the last raised
    -- exception is returned.
    ----------------------------------------------------------------------
    procedure Exception_Current
                 (Id : out Address; -- id is sometimes referred to as image
                  Pc : out Address); -- pc where the exception was raised

    -- Each task has a copy of the id and pc for
    -- the last raised exception. There is also a single copy maintained
    -- for exceptions raised in an ISR or in a NO TASKING program.
    --
    -- If exceptions are raised in nested ISR handlers, then, the
    -- previous exception information is silently overwritten.


    ----------------------------------------------------------------------
    -- Returns the name for the specified exception id. Id is sometimes
    -- referred to as "image".
    ----------------------------------------------------------------------
    function Exception_Name (Id : Address) return String;


    ----------------------------------------------------------------------
    -- Install a callout to be called whenever an exception is raised.
    --
    -- If unable to allocate memory for the callout data structure,
    -- STORAGE_ERROR exception is raised.
    --
    -- The callouts are called in LIFO order.
    --
    -- An example of an exception_callout that maintains a circular
    -- buffer of all raised Ada exceptions is provided in the
    -- trace_xcpt package found at the end of this file.
    ----------------------------------------------------------------------
    procedure Exception_Callout_Install (Proc : Address);
    -- The callout procedure is called as follows:
    --\x09\x09procedure exception_callout_proc(
    --\x09\x09\x09id\x09\x09\x09: address;\x09-- also referred to as "image"
    --\x09\x09\x09pc\x09\x09\x09: address;\x09-- pc where exception was raised
    --\x09\x09\x09reg_context\x09: address);\x09-- pointer to register context
    --\x09\x09\x09\x09\x09\x09\x09\x09\x09-- saved on the stack. Content
    --\x09\x09\x09\x09\x09\x09\x09\x09\x09-- is CPU specific. See below.
    --
    -- The exception_callout_proc() must be reentrant. It can be
    -- concurrently called from multiple tasks or an ISR.
    --
    -- Upon entry, stack limit checking has already been disabled.
    --
    -- reg_context points to:
    --\x09for SPARC:
    --\x09\x09if TRACEBACK_REGS = TRUE (via debugger "set except_stack")
    --\x09\x09\x09g0..g7, o0..o7, where o6 points to locals and ins
    --\x09\x09else
    --\x09\x09\x09no register context is saved, reg_context = NO_ADDR
    --\x09\x09end if
    --
    --\x09\x09TRACEBACK_REGS may be set in the user program via:
    --\x09\x09\x09traceback_regs: boolean;
    --\x09\x09\x09pragma interface_name(traceback_regs, "TRACEBACK_REGS");
    --\x09\x09\x09...
    --\x09\x09\x09traceback_regs := TRUE;
    --
    --\x09for MIPS:
    --\x09\x09r0..r31, where only v0, s0..s7, sp, fp, and ra have been saved
    --
    --\x09for M68K:
    --\x09\x09d0..d7, a0..a7, where only d4..d7, a2..a7 have been saved
    --
    --\x09for VAX (Ultrix):
    --\x09\x09r0..r15, where only r6..r15 have been saved
    --
    --\x09for VAX (VMS):
    --\x09\x09r0..r15, where only r2..r15 have been saved
    --
    --\x09for HP-9000/700 (HP-UX):
    --      fr0..fr31, gr0..gr31, where only fr12..fr21, rp, gr2..gr18,
    --      ret0, and sp have been saved.  On machines with PA-RISC
    --      architecture revision 1.0, fr16..fr21 are not saved.  Note
    --      that the float registers are 64 bits in size.
    --

    ----------------------------------------------------------------------
    -- You can call the following VADS service to produce a "core"
    -- file from anywhere in your program.
    --
    -- Only applicable to Unix self-hosts.
    ----------------------------------------------------------------------
    procedure Dump_Core;

    ----------------------------------------------------------------------
    -- Call the following service to enable the generation of
    -- a "core" file for an unhandled Ada exception.
    --
    -- Only applicable to Unix self-hosts.
    ----------------------------------------------------------------------
    procedure Enable_Unhandled_Dump_Core;
    pragma Inline_Only (Enable_Unhandled_Dump_Core);

    ----------------------------------------------------------------------
    -- Call the following service if you also want the exception
    -- traceback regs to be saved for a unhandled core dump.
    -- Note, saving the traceback regs will add a small amount of time to
    -- normal Ada exception handling. However, TRACEBACK_REGS must be set
    -- if you want to know where the unhandled exception was executed.
    --
    -- Only applicable to Unix self-hosts.
    ----------------------------------------------------------------------
    procedure Enable_Traceback_Regs;
    pragma Inline_Only (Enable_Traceback_Regs);


private
    pragma Interface (Ada, Exception_Current);
    pragma Interface_Name (Exception_Current, "__EXCEPTION_CURRENT");

    pragma Interface (Ada, Exception_Name);
    pragma Interface_Name (Exception_Name, "__EXCEPTION_NAME");

    pragma Interface (Ada, Exception_Callout_Install);
    pragma Interface_Name (Exception_Callout_Install,
                           "__EXCEPTION_CALLOUT_INSTALL");

    pragma Interface (Ada, Dump_Core);
    pragma Interface_Name (Dump_Core, "DUMP_CORE");
end V_I_Except;


E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=1b rec1=00 rec2=01 rec3=088
        [0x01] rec0=14 rec1=00 rec2=02 rec3=03c
        [0x02] rec0=15 rec1=00 rec2=03 rec3=028
        [0x03] rec0=1b rec1=00 rec2=04 rec3=02c
        [0x04] rec0=18 rec1=00 rec2=05 rec3=042
        [0x05] rec0=16 rec1=00 rec2=06 rec3=03c
        [0x06] rec0=0e rec1=00 rec2=07 rec3=000
    tail 0x2175805a4878e79ceb8a0 0x42a00088462060003