debug: add a breakpoint before unhandled aborts

This commit is contained in:
Danny Robson 2019-01-07 12:17:16 +11:00
parent 9e5cfc0dc6
commit 04a44c627f

View File

@ -71,6 +71,11 @@ warn (const char *msg)
////////////////////////////////////////////////////////////////////////////////
static void abort_with_trace (void)
{
// Manually trigger a breakpoint if possible so that the debugger won't
// silently dump us some place without further information.
// eg, CLion/GDB/Win32 silently dropping us out of the session.
breakpoint ();
// If this is because of an exception we may as well rethrow and hope that
// the system will print exception data during the abort process.
//