[PATCH] kernel32: Don't clear WINEDEBUG in the debugger process.
Zebediah Figura
z.figura12 at gmail.com
Fri Jul 20 04:44:17 CDT 2018
While this does avoid usually undesired debug output, it also makes
debugging winedbg.exe itself practically impossible.
---
dlls/kernel32/except.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c
index bff8ce2..03fb46d 100644
--- a/dlls/kernel32/except.c
+++ b/dlls/kernel32/except.c
@@ -173,7 +173,7 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
{
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
- char *cmdline, *env, *p;
+ char *cmdline;
HANDLE hDbgConf;
DWORD bAuto = TRUE;
PROCESS_INFORMATION info;
@@ -287,27 +287,12 @@ 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 (!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;
- }
- }
-
TRACE("Starting debugger %s\n", debugstr_a(cmdline));
memset(&startup, 0, sizeof(startup));
startup.cb = sizeof(startup);
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = SW_SHOWNORMAL;
- ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, env, NULL, &startup, &info);
- FreeEnvironmentStringsA( env );
+ ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &startup, &info);
if (ret)
{
--
2.7.4
More information about the wine-devel
mailing list