1 |
281 |
jeremybenn |
------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-- GNAT COMPILER COMPONENTS --
|
4 |
|
|
-- --
|
5 |
|
|
-- G N A T . E X C E P T I O N _ A C T I O N S . C O R E _ D U M P --
|
6 |
|
|
-- --
|
7 |
|
|
-- B o d y --
|
8 |
|
|
-- --
|
9 |
|
|
-- Copyright (C) 2003-2009, Free Software Foundation, Inc. --
|
10 |
|
|
-- --
|
11 |
|
|
-- GNAT is free software; you can redistribute it and/or modify it under --
|
12 |
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
13 |
|
|
-- ware Foundation; either version 3, or (at your option) any later ver- --
|
14 |
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
15 |
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
16 |
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. --
|
17 |
|
|
-- --
|
18 |
|
|
-- As a special exception under Section 7 of GPL version 3, you are granted --
|
19 |
|
|
-- additional permissions described in the GCC Runtime Library Exception, --
|
20 |
|
|
-- version 3.1, as published by the Free Software Foundation. --
|
21 |
|
|
-- --
|
22 |
|
|
-- You should have received a copy of the GNU General Public License and --
|
23 |
|
|
-- a copy of the GCC Runtime Library Exception along with this program; --
|
24 |
|
|
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
|
25 |
|
|
-- <http://www.gnu.org/licenses/>. --
|
26 |
|
|
-- --
|
27 |
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
28 |
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
29 |
|
|
-- --
|
30 |
|
|
------------------------------------------------------------------------------
|
31 |
|
|
|
32 |
|
|
-- This is the VMS version
|
33 |
|
|
|
34 |
|
|
with System;
|
35 |
|
|
with System.Aux_DEC;
|
36 |
|
|
separate (GNAT.Exception_Actions)
|
37 |
|
|
procedure Core_Dump (Occurrence : Exception_Occurrence) is
|
38 |
|
|
|
39 |
|
|
use System;
|
40 |
|
|
use System.Aux_DEC;
|
41 |
|
|
|
42 |
|
|
pragma Unreferenced (Occurrence);
|
43 |
|
|
|
44 |
|
|
SS_IMGDMP : constant := 1276;
|
45 |
|
|
|
46 |
|
|
subtype Cond_Value_Type is Unsigned_Longword;
|
47 |
|
|
subtype Access_Mode_Type is
|
48 |
|
|
Unsigned_Word range 0 .. 3;
|
49 |
|
|
Access_Mode_Zero : constant Access_Mode_Type := 0;
|
50 |
|
|
|
51 |
|
|
Status : Cond_Value_Type;
|
52 |
|
|
|
53 |
|
|
procedure Setexv (
|
54 |
|
|
Status : out Cond_Value_Type;
|
55 |
|
|
Vector : Unsigned_Longword := 0;
|
56 |
|
|
Addres : Address := Address_Zero;
|
57 |
|
|
Acmode : Access_Mode_Type := Access_Mode_Zero;
|
58 |
|
|
Prvhnd : Unsigned_Longword := 0);
|
59 |
|
|
pragma Interface (External, Setexv);
|
60 |
|
|
pragma Import_Valued_Procedure (Setexv, "SYS$SETEXV",
|
61 |
|
|
(Cond_Value_Type, Unsigned_Longword, Address, Access_Mode_Type,
|
62 |
|
|
Unsigned_Longword),
|
63 |
|
|
(Value, Value, Value, Value, Value));
|
64 |
|
|
|
65 |
|
|
procedure Lib_Signal (I : Integer);
|
66 |
|
|
pragma Interface (C, Lib_Signal);
|
67 |
|
|
pragma Import_Procedure (Lib_Signal, "LIB$SIGNAL", Mechanism => (Value));
|
68 |
|
|
begin
|
69 |
|
|
Setexv (Status, 1, Address_Zero, 3);
|
70 |
|
|
Lib_Signal (SS_IMGDMP);
|
71 |
|
|
end Core_Dump;
|