[common] debug: print backtraces on assertions

This commit is contained in:
Geoffrey McRae
2026-08-04 10:55:04 +10:00
parent ad53a5e4ee
commit e5315363d8
2 changed files with 10 additions and 0 deletions

View File

@@ -154,7 +154,9 @@ void debug_trace(const char * file, unsigned int line, const char * function,
if (!(__VA_ARGS__)) \
{ \
DEBUG_ASSERT_PRINT(__VA_ARGS__); \
DEBUG_PRINT_BACKTRACE(); \
abort(); \
DEBUG_UNREACHABLE_MARKER(); \
} \
} while (0)

View File

@@ -156,6 +156,10 @@ bool installCrashHandler(const char * exe, char * argv0)
return true;
}
void printBacktrace(void)
{
}
void printAllThreadBacktraces(void)
{
}
@@ -168,6 +172,10 @@ bool installCrashHandler(const char * exe, char * argv0)
return true;
}
void printBacktrace(void)
{
}
void printAllThreadBacktraces(void)
{
}