Zebediah Figura : kernel32: Don' t clear WINEDEBUG in the debugger process if +winedbg is set.
Alexandre Julliard
julliard at winehq.org
Thu Aug 16 13:42:47 CDT 2018
Module: wine
Branch: master
Commit: a1d12ad5c68de7f3cbe0e34baa83dd8eedaab64f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a1d12ad5c68de7f3cbe0e34baa83dd8eedaab64f
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Aug 15 20:34:00 2018 -0500
kernel32: Don't clear WINEDEBUG in the debugger process if +winedbg is set.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/except.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c
index de244fc..c4f7faf 100644
--- a/dlls/kernel32/except.c
+++ b/dlls/kernel32/except.c
@@ -54,6 +54,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(seh);
+WINE_DECLARE_DEBUG_CHANNEL(winedbg);
static PTOP_LEVEL_EXCEPTION_FILTER top_filter;
@@ -289,15 +290,18 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
/* make WINEDEBUG empty in the environment */
env = GetEnvironmentStringsA();
- for (p = env; *p; p += strlen(p) + 1)
+ if (!TRACE_ON(winedbg))
{
- if (!memcmp( p, "WINEDEBUG=", sizeof("WINEDEBUG=")-1 ))
+ for (p = env; *p; p += strlen(p) + 1)
{
- char *next = p + strlen(p);
- char *end = next + 1;
- while (*end) end += strlen(end) + 1;
- memmove( p + sizeof("WINEDEBUG=") - 1, next, end + 1 - next );
- break;
+ if (!memcmp( p, "WINEDEBUG=", sizeof("WINEDEBUG=")-1 ))
+ {
+ char *next = p + strlen(p);
+ char *end = next + 1;
+ while (*end) end += strlen(end) + 1;
+ memmove( p + sizeof("WINEDEBUG=") - 1, next, end + 1 - next );
+ break;
+ }
}
}
More information about the wine-cvs
mailing list