From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 24763395B46C for ; Wed, 29 Apr 2020 15:28:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 24763395B46C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.193] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3A3ED1F068; Wed, 29 Apr 2020 11:28:58 -0400 (EDT) Subject: Re: [PATCH v2] Implement debugging of WOW64 processes in gdbserver To: Eli Zaretskii Cc: ssbssa@yahoo.de, gdb-patches@sourceware.org References: <20200427133416.9314-1-ssbssa.ref@yahoo.de> <20200427133416.9314-1-ssbssa@yahoo.de> <7ec0c0b7-5425-d766-326b-9d5b13b755b4@simark.ca> <471105047.4011567.1588157665165@mail.yahoo.com> <83tv12xqy2.fsf@gnu.org> From: Simon Marchi Message-ID: <42561057-d7d8-58cb-f461-3f7bb92f2239@simark.ca> Date: Wed, 29 Apr 2020 11:28:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83tv12xqy2.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 15:29:00 -0000 On 2020-04-29 11:16 a.m., Eli Zaretskii wrote: >> From: Simon Marchi >> 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