Indeed, I didn't consider the case where another exception is raised at the same time the debugger tries to break.
On 1/28/20 3:50 PM, Jacek Caban wrote:
Another solution would be to ensure that system APCs are ran with signals blocked on client side. It's quite tricky through as it would require disabling signals while waiting in server_select (except for user APCs). This could be fine if we passed CPU context in select request, so that server wouldn't need any signal to suspend the thread.
I'm not sure to see why passing the context would make things easier, I understand it's just a matter of extending the size of the uninterrupted section in wine_server_call to stay in it while processing system apcs.
However it still wouldn't solve the issue I described previously, where WaitForDebugEvent would return as soon as the exception debug event is linked, and the debugger could then assume the process is stopped although some threads are still possibly running system apcs.