From 04a44c627f5ba5a7245168158cd9ae23d961b5d3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 7 Jan 2019 12:17:16 +1100 Subject: [PATCH] debug: add a breakpoint before unhandled aborts --- debug.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debug.cpp b/debug.cpp index d8c95170..04b0763e 100644 --- a/debug.cpp +++ b/debug.cpp @@ -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. //