os_DebugBreak is [[noreturn]]
This commit is contained in:
parent
5096d50d37
commit
5703ef26cf
|
@ -383,9 +383,10 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
|
||||
#if defined(__unix__)
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
raise(SIGTRAP);
|
||||
std::abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ double os_GetSeconds()
|
|||
}
|
||||
|
||||
#if !defined(__unix__) && !defined(LIBRETRO)
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
__builtin_trap();
|
||||
}
|
||||
|
|
|
@ -167,17 +167,15 @@ inline static void JITWriteProtect(bool enabled) {
|
|||
#define VER_EMUNAME "Flycast"
|
||||
#define VER_SHORTNAME VER_EMUNAME
|
||||
|
||||
void os_DebugBreak();
|
||||
#define dbgbreak os_DebugBreak()
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define stricmp strcasecmp
|
||||
#endif
|
||||
|
||||
[[noreturn]] void os_DebugBreak();
|
||||
void fatal_error(const char* text, ...);
|
||||
|
||||
#define verify(x) do { if ((x) == false){ fatal_error("Verify Failed : " #x "\n in %s -> %s : %d", (__FUNCTION__), (__FILE__), __LINE__); dbgbreak;}} while (false)
|
||||
#define die(reason) do { fatal_error("Fatal error : %s\n in %s -> %s : %d", (reason), (__FUNCTION__), (__FILE__), __LINE__); dbgbreak;} while (false)
|
||||
#define verify(x) do { if ((x) == false){ fatal_error("Verify Failed : " #x "\n in %s -> %s : %d", (__FUNCTION__), (__FILE__), __LINE__); os_DebugBreak();}} while (false)
|
||||
#define die(reason) do { fatal_error("Fatal error : %s\n in %s -> %s : %d", (reason), (__FUNCTION__), (__FILE__), __LINE__); os_DebugBreak();} while (false)
|
||||
|
||||
enum class JVS {
|
||||
Default,
|
||||
|
|
|
@ -941,7 +941,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
return 0;
|
||||
}
|
||||
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
__debugbreak();
|
||||
}
|
||||
|
|
|
@ -532,7 +532,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_reicast_emulator_emu_AudioBackend_set
|
|||
}
|
||||
}
|
||||
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
// TODO: notify the parent thread about it ...
|
||||
|
||||
|
|
|
@ -3002,7 +3002,7 @@ void fatal_error(const char* text, ...)
|
|||
}
|
||||
}
|
||||
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
ERROR_LOG(COMMON, "DEBUGBREAK!");
|
||||
//exit(-1);
|
||||
|
|
|
@ -3,13 +3,9 @@
|
|||
#include "types.h"
|
||||
|
||||
#ifndef __ANDROID__
|
||||
void os_DebugBreak()
|
||||
[[noreturn]] void os_DebugBreak()
|
||||
{
|
||||
#ifdef __linux__
|
||||
raise(SIGTRAP);
|
||||
#elif defined(_WIN32)
|
||||
__debugbreak();
|
||||
#endif
|
||||
std::abort();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
Loading…
Reference in New Issue