[PATCH v2] Implement debugging of WOW64 processes in gdbserver

Simon Marchi simark@simark.ca
Wed Apr 29 15:28:57 GMT 2020


On 2020-04-29 11:16 a.m., Eli Zaretskii wrote:
>> From: Simon Marchi <simark@simark.ca>
>> Date: Wed, 29 Apr 2020 11:09:08 -0400
>>
>>> These functions are not available on WinXP, and the extra check for them
>>> was actually the reason of this v2:
>>>
>>> +  if (wow64_process
>>> +      && (win32_Wow64SuspendThread == nullptr
>>> +      || win32_Wow64GetThreadContext == nullptr
>>> +      || win32_Wow64SetThreadContext == nullptr))
>>> +    error ("WOW64 debugging is not supported on this system.\n");
>>
>> Ok, please add a comment to that effect then.  This way if we decide we no longer want
>> to support Windows XP, we can remove this in favor of just calling the functions directly.
> 
> Do the functions exist on 32-bit Windows systems newer than XP?  The
> documentation says:
> 
>   It is not supported on 32-bit Windows; such calls fail and set the
>   last error code to ERROR_INVALID_FUNCTION.
> 
> I'm not sure what this means for calling these functions directly.

>From what I understand, the program will still compile and link, but the call will fail.

Anyway, if we only use them in some `#ifdef __x86_64__` (as this patch does), we won't
have this problem.

Simon


More information about the Gdb-patches mailing list