diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 17:09:23 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 17:09:23 +0000 |
commit | f4b5aa022371edd2a1de8015ba21847971cc2d20 (patch) | |
tree | 8c2960c118c02a29b21e6b6ef25b1ee37a3683b0 /gcc/ada/comperr.adb | |
parent | c3ba908e6598dd5ef8efd73ccb9cc43d04fcfb72 (diff) | |
download | gcc-f4b5aa022371edd2a1de8015ba21847971cc2d20.tar.gz |
* comperr.adb (Abort_In_Progress): New.
(Compiler_Abort): Use it to prevent recursion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/comperr.adb')
-rw-r--r-- | gcc/ada/comperr.adb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ada/comperr.adb b/gcc/ada/comperr.adb index e92e0c4a97e..b3d868fab60 100644 --- a/gcc/ada/comperr.adb +++ b/gcc/ada/comperr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.57 $ +-- $Revision: 1.1 $ -- -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- -- @@ -51,6 +51,14 @@ with System.Soft_Links; use System.Soft_Links; package body Comperr is + ---------------- + -- Local Data -- + ---------------- + + Abort_In_Progress : Boolean := False; + -- Used to prevent runaway recursion if something segfaults + -- while processing a previous abort. + ----------------------- -- Local Subprograms -- ----------------------- @@ -82,6 +90,14 @@ package body Comperr is -- Start of processing for Compiler_Abort begin + -- Prevent recursion through Compiler_Abort, e.g. via SIGSEGV. + + if Abort_In_Progress then + Exit_Program (E_Abort); + end if; + + Abort_In_Progress := True; + -- If errors have already occured, then we guess that the abort may -- well be caused by previous errors, and we don't make too much fuss -- about it, since we want to let the programmer fix the errors first. |