kernel32/tests: Fix a debugger test failing on Windows.
commit6e19585112fd358470e7cf62be18fd6a1a5e7605
authorEric Pouech <eric.pouech@gmail.com>
Thu, 15 Dec 2022 16:36:32 +0000 (15 17:36 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 15 Dec 2022 21:29:19 +0000 (15 22:29 +0100)
treeb3ac17916e0a5c20ab931d9668f66cf2a21c840a
parent7a6eeb8c34d714241a65dc7c254e700eaf374c2e
kernel32/tests: Fix a debugger test failing on Windows.

Testing: kernel32:debugger, there's sometimes the following error:
debugger.c:1760: Test failed: unexpected instruction pointer 778B2A0C

Current test code has a workaround when this happens on last thread, but
this is clearly not sufficient.

Fix the test so that it grabs the thread context only in a place we're
sure it's in stopped state at breakpoint instruction.
(Current code likely catches cases where the thread is in bp signal
handling).

Rewrote the test to be in more logical order.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53143
dlls/kernel32/tests/debugger.c