mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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.
This commit is contained in:
parent
8bb95a820a
commit
0954594b2d
3 changed files with 13 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue