1627f7eb2Smrg // -*- C++ -*- default std::terminate handler 2*4c3eb207Smrg // Copyright (C) 2002-2020 Free Software Foundation, Inc. 3627f7eb2Smrg // 4627f7eb2Smrg // This file is part of GCC. 5627f7eb2Smrg // 6627f7eb2Smrg // GCC is free software; you can redistribute it and/or modify 7627f7eb2Smrg // it under the terms of the GNU General Public License as published by 8627f7eb2Smrg // the Free Software Foundation; either version 3, or (at your option) 9627f7eb2Smrg // any later version. 10627f7eb2Smrg // 11627f7eb2Smrg // GCC is distributed in the hope that it will be useful, 12627f7eb2Smrg // but WITHOUT ANY WARRANTY; without even the implied warranty of 13627f7eb2Smrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14627f7eb2Smrg // GNU General Public License for more details. 15627f7eb2Smrg // 16627f7eb2Smrg // Under Section 7 of GPL version 3, you are granted additional 17627f7eb2Smrg // permissions described in the GCC Runtime Library Exception, version 18627f7eb2Smrg // 3.1, as published by the Free Software Foundation. 19627f7eb2Smrg 20627f7eb2Smrg // You should have received a copy of the GNU General Public License and 21627f7eb2Smrg // a copy of the GCC Runtime Library Exception along with this program; 22627f7eb2Smrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23627f7eb2Smrg // <http://www.gnu.org/licenses/>. 24627f7eb2Smrg 25627f7eb2Smrg #include <bits/c++config.h> 26627f7eb2Smrg 27627f7eb2Smrg /* We default to the talkative, informative handler in a normal hosted 28627f7eb2Smrg library. This pulls in the demangler, the dyn-string utilities, and 29627f7eb2Smrg elements of the I/O library. For a low-memory environment, you can return 30627f7eb2Smrg to the earlier "silent death" handler by configuring GCC with 31627f7eb2Smrg --disable-libstdcxx-verbose and rebuilding the library. 32627f7eb2Smrg In a freestanding environment, we default to this latter approach. */ 33627f7eb2Smrg 34627f7eb2Smrg #if _GLIBCXX_HOSTED && _GLIBCXX_VERBOSE && __cpp_exceptions 35627f7eb2Smrg # define _GLIBCXX_DEFAULT_TERM_HANDLER __gnu_cxx::__verbose_terminate_handler 36627f7eb2Smrg #else 37627f7eb2Smrg # include <cstdlib> 38627f7eb2Smrg # define _GLIBCXX_DEFAULT_TERM_HANDLER std::abort 39627f7eb2Smrg #endif 40