OSDN Git Service

2008-04-08 Ed Schonberg <schonberg@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-except.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                    S Y S T E M . E X C E P T I O N S                     --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --          Copyright (C) 2006-2007, 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,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, 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 package contains internal routines used as debugger helpers.
35 --  It should be compiled without optimization to let debuggers inspect
36 --  parameter values reliably from breakpoints on the routines.
37
38 pragma Warnings (Off);
39 pragma Compiler_Unit;
40 pragma Warnings (On);
41
42 with System.Standard_Library;
43
44 package System.Exceptions is
45
46    pragma Warnings (Off);
47    pragma Preelaborate_05;
48    pragma Warnings (On);
49    --  To let Ada.Exceptions "with" us and let us "with" Standard_Library
50
51    package SSL renames System.Standard_Library;
52    --  To let some of the hooks below have formal parameters typed in
53    --  accordance with what GDB expects.
54
55    procedure Debug_Raise_Exception (E : SSL.Exception_Data_Ptr);
56    pragma Export
57      (Ada, Debug_Raise_Exception, "__gnat_debug_raise_exception");
58    --  Hook called at a "raise" point for an exception E, when it is
59    --  just about to be propagated.
60
61    procedure Debug_Unhandled_Exception (E : SSL.Exception_Data_Ptr);
62    pragma Export
63      (Ada, Debug_Unhandled_Exception, "__gnat_unhandled_exception");
64    --  Hook called during the propagation process of an exception E, as soon
65    --  as it is known to be unhandled.
66
67    procedure Debug_Raise_Assert_Failure;
68    pragma Export
69      (Ada, Debug_Raise_Assert_Failure, "__gnat_debug_raise_assert_failure");
70    --  Hook called when an assertion failed. This is used by the debugger to
71    --  intercept assertion failures, and treat them specially.
72
73    procedure Local_Raise (Excep : System.Address);
74    pragma Export (Ada, Local_Raise);
75    --  This is a dummy routine, used only by the debugger for the purpose of
76    --  logging local raise statements that were transformed into a direct goto
77    --  to the handler code. The compiler in this case generates:
78    --
79    --    Local_Raise (exception_data'address);
80    --    goto Handler
81    --
82    --  The argument is the address of the exception data
83
84 end System.Exceptions;