From ff04381a1d8c56558fa082445d37d7ca86f862ba Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 11 Mar 2002 19:16:44 +0000 Subject: [PATCH] make assert-abort work in VC7 --- dtool/src/dconfig/notify.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dtool/src/dconfig/notify.cxx b/dtool/src/dconfig/notify.cxx index 8b9af791fe..5c7a999ef9 100644 --- a/dtool/src/dconfig/notify.cxx +++ b/dtool/src/dconfig/notify.cxx @@ -427,7 +427,14 @@ assert_failure(const char *expression, int line, if (get_assert_abort()) { #ifdef WIN32 - assert(false); + // How to trigger an exception in VC++ that offers to take us into + // the debugger? abort() doesn't do it. We used to be able to + // assert(false), but in VC++ 7 that just throws an exception, and + // an uncaught exception just exits, without offering to open the + // debugger. Guess we'll have to force a segfault. + + int *ptr = (int *)NULL; + *ptr = 1; #else abort(); #endif