SERiF 0.0.1a
3+1D Stellar Structure and Evolution
Loading...
Searching...
No Matches
debug.h
Go to the documentation of this file.
1/* ***********************************************************************
2//
3// Copyright (C) 2025 -- The 4D-STAR Collaboration
4// File Author: Emily Boudreaux
5// Last Modified: March 20, 2025
6//
7// 4DSSE is free software; you can use it and/or modify
8// it under the terms and restrictions the GNU General Library Public
9// License version 3 (GPLv3) as published by the Free Software Foundation.
10//
11// 4DSSE is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14// See the GNU Library General Public License for more details.
15//
16// You should have received a copy of the GNU Library General Public License
17// along with this software; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// *********************************************************************** */
33#pragma once
34
35#ifdef __GNUC__ // GCC and Clang
39 #define BREAKPOINT() __builtin_debugtrap()
40#elif defined(_MSC_VER) // MSVC
44 #define BREAKPOINT() __debugbreak()
45#elif defined(__APPLE__) && defined(__MACH__) // macOS with Clang and LLDB
46 #include <signal.h>
50 #define BREAKPOINT() raise(SIGTRAP)
51#else
52 #include <csignal>
56 #define BREAKPOINT() std::raise(SIGTRAP)
57#endif