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 index 8753c49b..a8383d55 100644 --- a/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch +++ b/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch @@ -1,24 +1,24 @@ -From efdcaba02d66b65177ce73686f4d4b5fb8f6e4f8 Mon Sep 17 00:00:00 2001 +From b617701d440a9b5210762503cf441e9fcb3132e1 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 + + dlls/kernelbase/debug.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)); +diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c +index 016c21109..0681f726b 100644 +--- a/dlls/kernelbase/debug.c ++++ b/dlls/kernelbase/debug.c +@@ -640,6 +640,7 @@ static BOOL start_debugger( EXCEPTION_POINTERS *epointers, HANDLE event ) + TRACE( "Starting debugger %s\n", debugstr_w(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); + ret = CreateProcessW( NULL, cmdline, NULL, NULL, TRUE, 0, env, NULL, &startup, &info ); -- -2.11.0 +2.23.0 diff --git a/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch b/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch index 38053165..67e33891 100644 --- a/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch +++ b/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch @@ -1,19 +1,19 @@ -From d14f1523f3694d7bc2c7c79b6b7bd6f2a354bfb7 Mon Sep 17 00:00:00 2001 +From bf3b9244f374b9926db04b63b29f77139280b44a Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 Sep 2014 23:39:51 +0200 Subject: ntdll: OutputDebugString should throw the exception a second time, if a debugger is attached. --- - dlls/kernel32/debugger.c | 17 +++++++++++++++++ + dlls/kernelbase/debug.c | 17 +++++++++++++++++ dlls/ntdll/tests/exception.c | 11 +++++------ 2 files changed, 22 insertions(+), 6 deletions(-) -diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c -index a277f93..2fb9c73 100644 ---- a/dlls/kernel32/debugger.c -+++ b/dlls/kernel32/debugger.c -@@ -277,6 +277,23 @@ void WINAPI OutputDebugStringA( LPCSTR str ) +diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c +index 016c21109..a3d14d340 100644 +--- a/dlls/kernelbase/debug.c ++++ b/dlls/kernelbase/debug.c +@@ -210,6 +210,23 @@ void WINAPI DECLSPEC_HOTPATCH OutputDebugStringA( LPCSTR str ) __ENDTRY if (caught_by_dbg) return; @@ -38,10 +38,10 @@ index a277f93..2fb9c73 100644 if (!mutex_inited) { diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index 7462024..151b67a 100644 +index 0a9dae138..b7b0f0e70 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c -@@ -2063,7 +2063,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce +@@ -2751,7 +2751,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce return EXCEPTION_CONTINUE_SEARCH; } @@ -50,7 +50,7 @@ index 7462024..151b67a 100644 { PVOID vectored_handler; -@@ -2079,7 +2079,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo) +@@ -2767,7 +2767,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo) outputdebugstring_exceptions = 0; OutputDebugStringA("Hello World"); @@ -58,7 +58,7 @@ index 7462024..151b67a 100644 ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %d exceptions, expected %d\n", outputdebugstring_exceptions, numexc); -@@ -2522,9 +2521,9 @@ START_TEST(exception) +@@ -3448,9 +3447,9 @@ START_TEST(exception) run_rtlraiseexception_test(EXCEPTION_BREAKPOINT); run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE); test_stage = 3; @@ -70,7 +70,7 @@ index 7462024..151b67a 100644 test_stage = 5; test_ripevent(0); test_stage = 6; -@@ -2553,7 +2552,7 @@ START_TEST(exception) +@@ -3481,7 +3480,7 @@ START_TEST(exception) test_exceptions(); test_rtlraiseexception(); test_debug_registers(); @@ -79,7 +79,7 @@ index 7462024..151b67a 100644 test_ripevent(1); test_debug_service(1); test_breakpoint(1); -@@ -2586,7 +2585,7 @@ START_TEST(exception) +@@ -3519,7 +3518,7 @@ START_TEST(exception) "_setjmp" ); test_debug_registers(); @@ -89,5 +89,5 @@ index 7462024..151b67a 100644 test_debug_service(1); test_breakpoint(1); -- -2.9.0 +2.23.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 772c4952..f5517b63 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "765815729fc4af2472e60551364e3b29dccfbcff" + echo "01b19b63a454aa455928c10c694895fdba901aba" } # Show version information @@ -3546,7 +3546,7 @@ fi # | * [#44819] Throw second DBG_PRINTEXCEPTION_C when debugging. # | # | Modified files: -# | * dlls/kernel32/debugger.c, dlls/ntdll/tests/exception.c +# | * dlls/kernelbase/debug.c, dlls/ntdll/tests/exception.c # | if test "$enable_ntdll_Exception" -eq 1; then patch_apply ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch @@ -4152,7 +4152,7 @@ fi # Patchset kernel32-Debugger # | # | Modified files: -# | * dlls/kernel32/except.c +# | * dlls/kernelbase/debug.c # | if test "$enable_kernel32_Debugger" -eq 1; then patch_apply kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch