OSDN Git Service

2004-05-17 Steve Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / gcc / ada / g-eacodu-vms.adb
1 ------------------------------------------------------------------------------
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 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 2,  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.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
20 -- MA 02111-1307, USA.                                                      --
21 --                                                                          --
22 -- As a special exception,  if other files  instantiate  generics from this --
23 -- unit, or you link  this unit with other files  to produce an executable, --
24 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
25 -- covered  by the  GNU  General  Public  License.  This exception does not --
26 -- however invalidate  any other reasons why  the executable file  might be --
27 -- covered by the  GNU Public License.                                      --
28 --                                                                          --
29 -- GNAT was originally developed  by the GNAT team at  New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
31 --                                                                          --
32 ------------------------------------------------------------------------------
33
34 --  This is the VMS version.
35
36 with System;
37 with System.Aux_DEC;
38 separate (GNAT.Exception_Actions)
39 procedure Core_Dump (Occurrence : Exception_Occurrence) is
40
41    use System;
42    use System.Aux_DEC;
43
44    pragma Unreferenced (Occurrence);
45
46    SS_IMGDMP : constant := 1276;
47
48    subtype Cond_Value_Type is Unsigned_Longword;
49    subtype Access_Mode_Type is
50       Unsigned_Word range 0 .. 3;
51    Access_Mode_Zero : constant Access_Mode_Type := 0;
52
53    Status : Cond_Value_Type;
54
55    procedure Setexv (
56      Status : out Cond_Value_Type;
57      Vector : in  Unsigned_Longword := 0;
58      Addres : in  Address           := Address_Zero;
59      Acmode : in  Access_Mode_Type  := Access_Mode_Zero;
60      Prvhnd : in  Unsigned_Longword := 0);
61    pragma Interface (External, Setexv);
62    pragma Import_Valued_Procedure (Setexv, "SYS$SETEXV",
63      (Cond_Value_Type, Unsigned_Longword, Address, Access_Mode_Type,
64       Unsigned_Longword),
65      (Value, Value, Value, Value, Value));
66
67    procedure Lib_Signal (I : in Integer);
68    pragma Interface (C, Lib_Signal);
69    pragma Import_Procedure (Lib_Signal, "LIB$SIGNAL", Mechanism => (Value));
70 begin
71    Setexv (Status, 1, Address_Zero, 3);
72    Lib_Signal (SS_IMGDMP);
73 end Core_Dump;