[PATCH 31/34 v1.2] Windows gdb+gdbserver: Check whether DBG_REPLY_LATER is available

Pedro Alves pedro@palves.net
Thu May 9 13:27:46 GMT 2024


On 2024-05-09 13:24, Eli Zaretskii wrote:
>> Date: Thu, 9 May 2024 12:11:40 +0100
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <pedro@palves.net>
>>
>> Are we going to trust that all the older supported Windows versions will work
>> this way (without testing them all)?  WinXP, Win7, etc?  If so, I can definitely
>> switch to that approach.
> 
> AFAIK, ERROR_INVALID_PARAMETER is the standard response to an
> unsupported parameter value, yes.
> 

That part will never in question.  As I said earlier, I have seen ERROR_INVALID_PARAMETER
errors when you call ContinueDebugEvent at a time when there is no event to continue, because
it had been continued already.  The error we see when we pass down pid=0 is ERROR_INVALID_HANDLE.
But we don't pass a handle down to ContinueDebugEvent, we pass down a pid and a tid.
So it could be reasonable for Windows to return ERROR_INVALID_PARAMETER in this situation too.

The risk is that some version of Windows does that (either older and newer), and we misdetect
the support as non-existing.

But we can cross that bridge when we come to it.  I'm happy with the approach as is.


More information about the Gdb-patches mailing list