|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body V_I_Except, seg_04b9ad
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
package body V_I_Except is procedure Enable_Unhandled_Dump_Core is Unhandled_Dump_Core_Enabled : Boolean; pragma Interface_Name (Unhandled_Dump_Core_Enabled, "UNHANDLED_DUMP_CORE_ENABLED"); begin Unhandled_Dump_Core_Enabled := True; end Enable_Unhandled_Dump_Core; procedure Enable_Traceback_Regs is Traceback_Regs : Boolean; pragma Interface_Name (Traceback_Regs, "TRACEBACK_REGS"); begin Traceback_Regs := True; end Enable_Traceback_Regs; end V_I_Except; -- The following is sample code that uses the services above. -- --\x09package trace_xcpt is -- --\x09-- When elaborated, the body of trace_xcpt installs an exception_callout --\x09-- that maintains a circular buffer of all raised Ada exceptions. -- --\x09-- If the program core dumps, a.db can be used to examine the --\x09-- the circular buffer to get a trace of where the last exception -- -- was originally raised and subsequently reraised. -- --\x09end trace_xcpt; --\x09 --\x09with system;\x09\x09\x09\x09\x09use system; --\x09with v_i_except; --\x09with unchecked_conversion; --\x09package body trace_xcpt is --\x09\x09-- This example traces the MIPS registers. It needs minor --\x09\x09-- modifications for other CPU architectures. --\x09 --\x09\x09type trace_entry_t is record --\x09\x09\x09id\x09\x09: address; --\x09\x09\x09pc\x09\x09: address; --\x09\x09\x09sp\x09\x09: address; --\x09\x09\x09ra\x09\x09: address; --\x09\x09end record; --\x09\x09type a_trace_entry_t is access trace_entry_t; --\x09 --\x09\x09TRACE_CNT\x09\x09\x09\x09\x09: constant integer := 100; --\x09\x09trace_entries\x09\x09\x09\x09: array (0..TRACE_CNT-1) of trace_entry_t; --\x09\x09 pragma external_name(trace_entries, "TRACE_ENTRIES"); --\x09\x09trace_bottom : address; --\x09\x09 pragma external_name(trace_bottom, "TRACE_BOTTOM"); --\x09\x09trace_top : address; --\x09\x09 pragma external_name(trace_top, "TRACE_TOP"); --\x09\x09trace_put : a_trace_entry_t; --\x09\x09 pragma external_name(trace_put, "TRACE_PUT"); --\x09 --\x09\x09TRACE_ENTRY_LEN: constant integer := trace_entry_t'size / STORAGE_UNIT; --\x09 --\x09\x09function to_a_trace_entry_t is --\x09\x09\x09new unchecked_conversion(address, a_trace_entry_t); --\x09\x09function to_address is --\x09\x09\x09new unchecked_conversion(a_trace_entry_t, address); --\x09 --\x09\x09type regs_t is array (0..31) of address; --\x09\x09type a_regs_t is access regs_t; --\x09\x09function to_a_regs_t is --\x09\x09\x09new unchecked_conversion(address, a_regs_t); --\x09 --\x09\x09procedure trace_callout(id: address; pc: address; --\x09\x09\x09reg_context: address) --\x09\x09is --\x09\x09\x09t\x09\x09: a_trace_entry_t; --\x09\x09\x09regs\x09: a_regs_t := to_a_regs_t(reg_context); --\x09\x09begin --\x09\x09\x09trace_put.id := id; --\x09\x09\x09trace_put.pc := pc; --\x09\x09\x09trace_put.sp := regs(29); --\x09\x09\x09trace_put.ra := regs(31); --\x09\x09\x09t := to_a_trace_entry_t(to_address(trace_put) + TRACE_ENTRY_LEN); --\x09\x09\x09if to_address(t) >= trace_top then --\x09\x09\x09\x09trace_put := to_a_trace_entry_t(trace_bottom); --\x09\x09\x09else --\x09\x09\x09\x09trace_put := t; --\x09\x09\x09end if; --\x09\x09end; --\x09begin --\x09\x09trace_bottom := trace_entries(trace_entries'first)'address; --\x09\x09trace_top := trace_bottom + TRACE_CNT * TRACE_ENTRY_LEN; --\x09\x09trace_put := to_a_trace_entry_t(trace_bottom); --\x09 --\x09\x09v_i_except.exception_callout_install(trace_callout'address); --\x09end trace_xcpt;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=1c rec1=00 rec2=01 rec3=030 [0x01] rec0=1d rec1=00 rec2=02 rec3=024 [0x02] rec0=1e rec1=00 rec2=03 rec3=04c [0x03] rec0=06 rec1=00 rec2=04 rec3=000 tail 0x21750bd728684382ff5b2 0x42a00088462060003