1181254a7Smrg // -*- C++ -*- default std::terminate handler 2*b1e83836Smrg // Copyright (C) 2002-2022 Free Software Foundation, Inc. 3181254a7Smrg // 4181254a7Smrg // This file is part of GCC. 5181254a7Smrg // 6181254a7Smrg // GCC is free software; you can redistribute it and/or modify 7181254a7Smrg // it under the terms of the GNU General Public License as published by 8181254a7Smrg // the Free Software Foundation; either version 3, or (at your option) 9181254a7Smrg // any later version. 10181254a7Smrg // 11181254a7Smrg // GCC is distributed in the hope that it will be useful, 12181254a7Smrg // but WITHOUT ANY WARRANTY; without even the implied warranty of 13181254a7Smrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14181254a7Smrg // GNU General Public License for more details. 15181254a7Smrg // 16181254a7Smrg // Under Section 7 of GPL version 3, you are granted additional 17181254a7Smrg // permissions described in the GCC Runtime Library Exception, version 18181254a7Smrg // 3.1, as published by the Free Software Foundation. 19181254a7Smrg 20181254a7Smrg // You should have received a copy of the GNU General Public License and 21181254a7Smrg // a copy of the GCC Runtime Library Exception along with this program; 22181254a7Smrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23181254a7Smrg // <http://www.gnu.org/licenses/>. 24181254a7Smrg 25181254a7Smrg #include <bits/c++config.h> 26181254a7Smrg 27181254a7Smrg /* We default to the talkative, informative handler in a normal hosted 28181254a7Smrg library. This pulls in the demangler, the dyn-string utilities, and 29181254a7Smrg elements of the I/O library. For a low-memory environment, you can return 30181254a7Smrg to the earlier "silent death" handler by configuring GCC with 31181254a7Smrg --disable-libstdcxx-verbose and rebuilding the library. 32181254a7Smrg In a freestanding environment, we default to this latter approach. */ 33181254a7Smrg 34181254a7Smrg #if _GLIBCXX_HOSTED && _GLIBCXX_VERBOSE && __cpp_exceptions 35181254a7Smrg # define _GLIBCXX_DEFAULT_TERM_HANDLER __gnu_cxx::__verbose_terminate_handler 36181254a7Smrg #else 37181254a7Smrg # include <cstdlib> 38181254a7Smrg # define _GLIBCXX_DEFAULT_TERM_HANDLER std::abort 39181254a7Smrg #endif 40