1132720Skan// -*- C++ -*- std::terminate handler
2132720Skan// Copyright (C) 2002, 2003 Free Software Foundation
3132720Skan//
4132720Skan// This file is part of GCC.
5132720Skan//
6132720Skan// GCC is free software; you can redistribute it and/or modify
7132720Skan// it under the terms of the GNU General Public License as published by
8132720Skan// the Free Software Foundation; either version 2, or (at your option)
9132720Skan// any later version.
10132720Skan//
11132720Skan// GCC is distributed in the hope that it will be useful,
12132720Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of
13132720Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14132720Skan// GNU General Public License for more details.
15132720Skan//
16132720Skan// You should have received a copy of the GNU General Public License
17132720Skan// along with GCC; see the file COPYING.  If not, write to
18169691Skan// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19169691Skan// Boston, MA 02110-1301, USA.
20132720Skan
21132720Skan// As a special exception, you may use this file as part of a free software
22132720Skan// library without restriction.  Specifically, if other files instantiate
23132720Skan// templates or use macros or inline functions from this file, or you compile
24132720Skan// this file and link it with other files to produce an executable, this
25132720Skan// file does not by itself cause the resulting executable to be covered by
26132720Skan// the GNU General Public License.  This exception does not however
27132720Skan// invalidate any other reasons why the executable file might be covered by
28132720Skan// the GNU General Public License.
29132720Skan
30169691Skan#include <bits/c++config.h>
31132720Skan#include "unwind-cxx.h"
32132720Skan
33132720Skan/* We default to the talkative, informative handler in a normal hosted
34132720Skan   library.  This pulls in the demangler, the dyn-string utilities, and
35132720Skan   elements of the I/O library.  For a low-memory environment, you can return
36132720Skan   to the earlier "silent death" handler by including <cstdlib>, initializing
37132720Skan   to "std::abort", and rebuilding the library.  In a freestanding mode, we
38132720Skan   default to this latter approach.  */
39132720Skan
40132720Skan#if ! _GLIBCXX_HOSTED
41132720Skan# include <cstdlib>
42132720Skan#endif
43132720Skan
44132720Skan/* The current installed user handler.  */
45132720Skanstd::terminate_handler __cxxabiv1::__terminate_handler =
46132720Skan#if _GLIBCXX_HOSTED
47132720Skan	__gnu_cxx::__verbose_terminate_handler;
48132720Skan#else
49132720Skan	std::abort;
50132720Skan#endif
51132720Skan
52