From 7b4727f89c7276351dfbed34241d51182f859a92 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 13 Jan 2017 02:00:22 +0100 Subject: [PATCH] Added patch to start debugger always on WinSta0. --- ...l32-Always-start-debugger-on-WinSta0.patch | 24 +++++++++++++++++++ patches/patchinstall.sh | 16 +++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch diff --git a/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch b/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch new file mode 100644 index 00000000..8753c49b --- /dev/null +++ b/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch @@ -0,0 +1,24 @@ +From efdcaba02d66b65177ce73686f4d4b5fb8f6e4f8 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Fri, 13 Jan 2017 01:59:13 +0100 +Subject: kernel32: Always start debugger on WinSta0. + +--- + dlls/kernel32/except.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c +index 1a1521a8038..cbc880f9a44 100644 +--- a/dlls/kernel32/except.c ++++ b/dlls/kernel32/except.c +@@ -314,6 +314,7 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) + TRACE("Starting debugger %s\n", debugstr_a(cmdline)); + memset(&startup, 0, sizeof(startup)); + startup.cb = sizeof(startup); ++ startup.lpDesktop = (char *)"WinSta0"; + startup.dwFlags = STARTF_USESHOWWINDOW; + startup.wShowWindow = SW_SHOWNORMAL; + ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, env, NULL, &startup, &info); +-- +2.11.0 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 3c1c6d3d..f7232b55 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -174,6 +174,7 @@ patch_enable_all () enable_kernel32_COMSPEC="$1" enable_kernel32_CopyFileEx="$1" enable_kernel32_Cwd_Startup_Info="$1" + enable_kernel32_Debugger="$1" enable_kernel32_FindFirstFile="$1" enable_kernel32_GetCurrentPackageFamilyName="$1" enable_kernel32_GetShortPathName="$1" @@ -718,6 +719,9 @@ patch_enable () kernel32-Cwd_Startup_Info) enable_kernel32_Cwd_Startup_Info="$2" ;; + kernel32-Debugger) + enable_kernel32_Debugger="$2" + ;; kernel32-FindFirstFile) enable_kernel32_FindFirstFile="$2" ;; @@ -4436,6 +4440,18 @@ if test "$enable_kernel32_Cwd_Startup_Info" -eq 1; then ) >> "$patchlist" fi +# Patchset kernel32-Debugger +# | +# | Modified files: +# | * dlls/kernel32/except.c +# | +if test "$enable_kernel32_Debugger" -eq 1; then + patch_apply kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch + ( + echo '+ { "Sebastian Lackner", "kernel32: Always start debugger on WinSta0.", 1 },'; + ) >> "$patchlist" +fi + # Patchset kernel32-FindFirstFile # | # | This patchset fixes the following Wine bugs: