docs(src): added documentation to all changes related to the resource manager
This commit is contained in:
@@ -1,11 +1,36 @@
|
||||
/**
|
||||
* @file debug.h
|
||||
* @brief Defines a macro for triggering a breakpoint in different compilers and platforms.
|
||||
*
|
||||
* This file provides a macro `BREAKPOINT()` that triggers a breakpoint
|
||||
* in the debugger, depending on the compiler and platform being used.
|
||||
*
|
||||
* Usage:
|
||||
* @code
|
||||
* BREAKPOINT(); // Triggers a breakpoint in the debugger
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__ // GCC and Clang
|
||||
/**
|
||||
* @brief Triggers a breakpoint in GCC and Clang.
|
||||
*/
|
||||
#define BREAKPOINT() __builtin_debugtrap()
|
||||
#elif defined(_MSC_VER) // MSVC
|
||||
/**
|
||||
* @brief Triggers a breakpoint in MSVC.
|
||||
*/
|
||||
#define BREAKPOINT() __debugbreak()
|
||||
#elif defined(__APPLE__) && defined(__MACH__) // macOS with Clang and LLDB
|
||||
#include <signal.h>
|
||||
/**
|
||||
* @brief Triggers a breakpoint in macOS with Clang and LLDB.
|
||||
*/
|
||||
#define BREAKPOINT() raise(SIGTRAP)
|
||||
#else
|
||||
#include <csignal>
|
||||
/**
|
||||
* @brief Triggers a breakpoint in other platforms.
|
||||
*/
|
||||
#define BREAKPOINT() std::raise(SIGTRAP)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user