1202283Slulf// -*- C++ -*- std::terminate handler 2202283Slulf// Copyright (C) 2002, 2003 Free Software Foundation 3202283Slulf// 4202283Slulf// This file is part of GCC. 5202283Slulf// 6202283Slulf// GCC is free software; you can redistribute it and/or modify 7202283Slulf// it under the terms of the GNU General Public License as published by 8202283Slulf// the Free Software Foundation; either version 2, or (at your option) 9202283Slulf// any later version. 10202283Slulf// 11202283Slulf// GCC is distributed in the hope that it will be useful, 12202283Slulf// but WITHOUT ANY WARRANTY; without even the implied warranty of 13202283Slulf// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14202283Slulf// GNU General Public License for more details. 15202283Slulf// 16202283Slulf// You should have received a copy of the GNU General Public License 17202283Slulf// along with GCC; see the file COPYING. If not, write to 18202283Slulf// the Free Software Foundation, 51 Franklin Street, Fifth Floor, 19202283Slulf// Boston, MA 02110-1301, USA. 20202283Slulf 21202283Slulf// As a special exception, you may use this file as part of a free software 22202283Slulf// library without restriction. Specifically, if other files instantiate 23202283Slulf// templates or use macros or inline functions from this file, or you compile 24202283Slulf// this file and link it with other files to produce an executable, this 25202283Slulf// file does not by itself cause the resulting executable to be covered by 26202283Slulf// the GNU General Public License. This exception does not however 27202283Slulf// invalidate any other reasons why the executable file might be covered by 28202283Slulf// the GNU General Public License. 29202283Slulf 30262623Spfg#include <bits/c++config.h> 31202283Slulf#include "unwind-cxx.h" 32202283Slulf 33217703Sjhb/* We default to the talkative, informative handler in a normal hosted 34217703Sjhb library. This pulls in the demangler, the dyn-string utilities, and 35217703Sjhb elements of the I/O library. For a low-memory environment, you can return 36217703Sjhb to the earlier "silent death" handler by including <cstdlib>, initializing 37217703Sjhb to "std::abort", and rebuilding the library. In a freestanding mode, we 38217703Sjhb default to this latter approach. */ 39217703Sjhb 40217703Sjhb#if ! _GLIBCXX_HOSTED 41217703Sjhb# include <cstdlib> 42217703Sjhb#endif 43217703Sjhb 44217703Sjhb/* The current installed user handler. */ 45217703Sjhbstd::terminate_handler __cxxabiv1::__terminate_handler = 46217703Sjhb#if _GLIBCXX_HOSTED 47258904Spfg __gnu_cxx::__verbose_terminate_handler; 48258904Spfg#else 49217703Sjhb std::abort; 50217703Sjhb#endif 51217703Sjhb 52202283Slulf