Commit 0954594b authored by unknown's avatar unknown

Fixes for DBUG_ABORT()


BitKeeper/deleted/.del-.tree-is-private:
  Delete: .tree-is-private
include/my_dbug.h:
  To disable the popup of abort() we use _CrtReportMode/File()
  (thanks Wlad)
mysys/my_thr_init.c:
  Visual Studio 2005 does not allow overloading library functions.
parent 8bb95a82
......@@ -87,7 +87,20 @@ extern void _db_flush_();
#define DEBUGGER_OFF do { _dbug_on_= 0; } while(0)
#define DEBUGGER_ON do { _dbug_on_= 1; } while(0)
#define IF_DBUG(A) A
#ifndef __WIN__
#define DBUG_ABORT() (_db_flush_(), abort())
#else
/*
Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we can
call abort() instead of _exit(3) (now it would cause a "test signal" popup).
*/
#include <crtdbg.h>
#define DBUG_ABORT() (_db_flush_(),\
(void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE),\
(void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR),\
_exit(3))
#endif
#else /* No debugger */
#define DBUG_ENTER(a1)
......
......@@ -444,18 +444,3 @@ static uint get_thread_lib(void)
}
#endif /* THREAD */
#ifdef __WIN__
/*
With Windows debug builds abort() causes a popup from CRT; as abort()
is used in tests it is annoying so we use a custom one.
*/
void abort(void)
{
#ifdef REENABLE_AFTER_FIX_FOR_BUG_31745 /* don't want a popup */
raise(SIGABRT);
#endif
_exit(3);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment