Show file:line where panic() was called from

This commit is contained in:
SChernykh
2023-01-14 12:19:25 +01:00
parent 2c4c2b8469
commit d4329ae594
10 changed files with 55 additions and 54 deletions
+6 -1
View File
@@ -149,7 +149,12 @@ FORCEINLINE T read_unaligned(const T* p)
template<typename T, size_t N> FORCEINLINE constexpr size_t array_size(T(&)[N]) { return N; }
template<typename T, typename U, size_t N> FORCEINLINE constexpr size_t array_size(T(U::*)[N]) { return N; }
[[noreturn]] void panic();
[[noreturn]] void panic_stop(const char* message);
#define STR(X) #X
#define STR2(X) STR(X)
#define PANIC_STOP(...) panic_stop(__FILE__ ":" STR2(__LINE__))
void make_thread_background();