7#include "architecture.hpp"
12#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
13void _debugger_break();
14#define tt_debugger_break() _debugger_break()
16#elif TT_COMPILER == TT_CC_GCC || TT_COMPILER == TT_CC_CLANG
17#define tt_debugger_break() __builtin_trap()
20#error "Not implemented"
25bool debugger_is_present() noexcept;
27[[noreturn]]
void debugger_abort(
std::
string const &message) noexcept;
35template<typename... Args>
36[[noreturn]] tt_no_inline
void
37debugger_abort(
char const *source_file,
int source_line,
std::string_view fmt, Args &&...args) noexcept
39 debugger_abort(std::format(fmt, std::forward<Args>(args)...));
42[[noreturn]] tt_no_inline
inline void debugger_abort(
char const *source_file,
int source_line)
noexcept
44 debugger_abort(source_file, source_line,
"<unknown>");
47#define tt_debugger_abort(...) ::tt::debugger_abort(__FILE__, __LINE__ __VA_OPT__(, ) __VA_ARGS__)