mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-24 17:32:29 -05:00
sys: improve FSP_DEBUGBRK_() macro
This commit is contained in:
parent
5abc81a58f
commit
0bbc1b4a43
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user