diff options
author | Thomas Quinot <quinot@adacore.com> | 2007-06-06 12:18:34 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-06-06 12:18:34 +0200 |
commit | 6c5290ce34a20a2fdb1e94e1e18e7daac9fc2823 (patch) | |
tree | 34593359b8bd031d198beba60724284ea01a5300 /gcc/ada/s-except.ads | |
parent | 107cd232e104d0f53bc7924bff71251388668707 (diff) | |
download | gcc-6c5290ce34a20a2fdb1e94e1e18e7daac9fc2823.zip gcc-6c5290ce34a20a2fdb1e94e1e18e7daac9fc2823.tar.gz gcc-6c5290ce34a20a2fdb1e94e1e18e7daac9fc2823.tar.bz2 |
a-except.ads, [...]: (Rmsg_28): Fix description for E.4(18) check.
2007-04-20 Thomas Quinot <quinot@adacore.com>
Olivier Hainque <hainque@adacore.com>
Robert Dewar <dewar@adacore.com>
* a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
check.
(Raise_Current_Excep): Call Debug_Raise_Exception just before
propagation starts, to let debuggers know about the event in a reliable
fashion.
(Local_Raise): Moved to System.Exceptions
More convenient to have this as a separate unit
* s-except.adb, s-except.ads: New files.
* a-exextr.adb (Unhandled_Exception): Delete - replaced by
Debug_Unhandled_Exception in System.Exceptions where it belongs
together with a couple of other debug helpers.
(Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
the former Unhandled_Exception.
* exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
(Warn_No_Exception_Propagation): New procedure
(Warn_If_No_Propagation): Rewritten for new warning generation
(Expand_Exception_Handlers): New warning generation
(Expand_N_Raise_xxx_Error): Rewritten for new warnings
(Add_Exception_Label): Use Special_Exception_Package_Used for test
instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
(Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
even if restriction is set (makes life easier in Check_Returns)
(Expand_Local_Exception_Handlers): Follow renamed entity chain when
checking exception identities.
(Expand_Local_Exception_Handlers): Do not optimize when all others case
(Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
block for handler (used by Check_Returns)
(Expand_Local_Exception_Handlers): Local_Raise now takes an address
(Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
remove all exception handlers when optimizing local raise statements.
(Find_Local_Handler): Use Get_Renamed_Entity
(Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
marked analyzed after expanding exception handlers, do not generate
redundant cleanup actions, because they have been constructed already.
From-SVN: r125375
Diffstat (limited to 'gcc/ada/s-except.ads')
-rw-r--r-- | gcc/ada/s-except.ads | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/gcc/ada/s-except.ads b/gcc/ada/s-except.ads new file mode 100644 index 0000000..34ff065 --- /dev/null +++ b/gcc/ada/s-except.ads @@ -0,0 +1,80 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- S Y S T E M . E X C E P T I O N S -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2006-2007, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- +-- Boston, MA 02110-1301, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This package contains internal routines used as debugger helpers. +-- It should be compiled without optimization to let debuggers inspect +-- parameter values reliably from breakpoints on the routines. + +with System.Standard_Library; + +package System.Exceptions is + + pragma Warnings (Off); + pragma Preelaborate_05; + pragma Warnings (On); + -- To let Ada.Exceptions "with" us and let us "with" Standard_Library. + + package SSL renames System.Standard_Library; + -- To let some of the hooks below have formal parameters typed in + -- accordance with what GDB expects. + + procedure Debug_Raise_Exception (E : SSL.Exception_Data_Ptr); + pragma Export + (Ada, Debug_Raise_Exception, "__gnat_debug_raise_exception"); + -- Hook called at a "raise" point for an exception E, when it is + -- just about to be propagated. + + procedure Debug_Unhandled_Exception (E : SSL.Exception_Data_Ptr); + pragma Export + (Ada, Debug_Unhandled_Exception, "__gnat_unhandled_exception"); + -- Hook called during the propagation process of an exception E, as soon + -- as it is known to be unhandled. + + procedure Debug_Raise_Assert_Failure; + pragma Export + (Ada, Debug_Raise_Assert_Failure, "__gnat_debug_raise_assert_failure"); + -- Hook called when an assertion failed. This is used by the debugger to + -- intercept assertion failures, and treat them specially. + + procedure Local_Raise (Excep : System.Address); + pragma Export (Ada, Local_Raise); + -- This is a dummy routine, used only by the debugger for the purpose of + -- logging local raise statements that were transformed into a direct goto + -- to the handler code. The compiler in this case generates: + -- + -- Local_Raise (exception_data'address); + -- goto Handler + -- + -- The argument is the address of the exception data + +end System.Exceptions; |