sys: improve FSP_DEBUGBRK_() macro

This commit is contained in:
Bill Zissimopoulos 2015-12-08 22:34:59 -08:00
parent 5abc81a58f
commit 0bbc1b4a43
2 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,7 @@
#define SYM(x) case x: return #x;
#define SYMBRC(x) case x: return "[" #x "]";
int fsp_bp_global = 1;
static ANSI_STRING DbgBreakPointInc = RTL_CONSTANT_STRING("Fsp*");
BOOLEAN HasDbgBreakPoint(const char *Function)
{

View File

@ -43,9 +43,10 @@
#define FSP_DEBUGBRK_() \
do \
{ \
static int fsp_bp_enabled = 1; \
if (fsp_bp_enabled && HasDbgBreakPoint(__FUNCTION__))\
try { DbgBreakPoint(); } except (EXCEPTION_EXECUTE_HANDLER) {}\
extern int fsp_bp_global; \
static int fsp_bp = 1; \
if (fsp_bp && fsp_bp_global && !KD_DEBUGGER_NOT_PRESENT && HasDbgBreakPoint(__FUNCTION__))\
DbgBreakPoint(); \
} while (0,0)
#else
#define FSP_DEBUGLOG_(fmt, rfmt, ...) ((void)0)