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 SYM(x) case x: return #x;
|
||||||
#define SYMBRC(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*");
|
static ANSI_STRING DbgBreakPointInc = RTL_CONSTANT_STRING("Fsp*");
|
||||||
BOOLEAN HasDbgBreakPoint(const char *Function)
|
BOOLEAN HasDbgBreakPoint(const char *Function)
|
||||||
{
|
{
|
||||||
|
@ -43,9 +43,10 @@
|
|||||||
#define FSP_DEBUGBRK_() \
|
#define FSP_DEBUGBRK_() \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
static int fsp_bp_enabled = 1; \
|
extern int fsp_bp_global; \
|
||||||
if (fsp_bp_enabled && HasDbgBreakPoint(__FUNCTION__))\
|
static int fsp_bp = 1; \
|
||||||
try { DbgBreakPoint(); } except (EXCEPTION_EXECUTE_HANDLER) {}\
|
if (fsp_bp && fsp_bp_global && !KD_DEBUGGER_NOT_PRESENT && HasDbgBreakPoint(__FUNCTION__))\
|
||||||
|
DbgBreakPoint(); \
|
||||||
} while (0,0)
|
} while (0,0)
|
||||||
#else
|
#else
|
||||||
#define FSP_DEBUGLOG_(fmt, rfmt, ...) ((void)0)
|
#define FSP_DEBUGLOG_(fmt, rfmt, ...) ((void)0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user