Really break into the debugger at the assertion line under wxGTK.

This completes the changes of r78408: in addition to making wxTrap() a macro,
we also need to call it directly from the assert macro expansion instead of
doing it from deep inside wx assert dialog code.

See #11184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2015-02-09 12:10:30 +00:00
parent 453897149f
commit 0c408e2785

View File

@@ -323,7 +323,13 @@ bool wxGUIAppTraits::ShowAssertDialog(const wxString& msg)
switch (result)
{
case GTK_ASSERT_DIALOG_STOP:
wxTrap();
// Don't call wxTrap() directly from here to avoid having the
// functions between the occurrence of the assert in the code
// and this function in the call stack. Instead, just set a
// flag so that inline expansion of the assert macro we are
// called from calls wxTrap() itself, like this the debugger
// would break exactly at the assert position.
wxTrapInAssert = true;
break;
case GTK_ASSERT_DIALOG_CONTINUE:
// nothing to do