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 34165385DC26 for ; Thu, 30 Apr 2020 16:26:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 34165385DC26 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 403421F3B1; Thu, 30 Apr 2020 12:26:42 -0400 (EDT) Subject: Re: [PATCH v3] Implement debugging of WOW64 processes in gdbserver To: Hannes Domani , gdb-patches@sourceware.org References: <20200430141349.21384-1-ssbssa.ref@yahoo.de> <20200430141349.21384-1-ssbssa@yahoo.de> From: Simon Marchi Message-ID: Date: Thu, 30 Apr 2020 12:26:41 -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: <20200430141349.21384-1-ssbssa@yahoo.de> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_2, 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: Thu, 30 Apr 2020 16:26:47 -0000 On 2020-04-30 10:13 a.m., Hannes Domani via Gdb-patches wrote: > gdbserver/ChangeLog: > > 2020-04-30 Hannes Domani > > * configure.srv (srv_tgtobj): > Add arch/i386.o. > * win32-arm-low.cc (arm_num_regs): New function. > (struct win32_target_ops): Use arm_num_regs. > * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64 > processes. > (i386_get_thread_context): Likewise. > (i386_prepare_to_resume): Likewise. > (i386_thread_added): Likewise. > (i386_single_step): Likewise. > (i386_fetch_inferior_register): Likewise. > (i386_store_inferior_register): Likewise. > (i386_arch_setup): Likewise. > (i386_win32_num_regs): New function. > (struct win32_target_ops): Use i386_win32_num_regs. > * win32-low.cc (win32_get_thread_context): Adapt for WOW64 > processes. > (win32_require_context): Likewise. > (child_add_thread): Likewise. > (do_initial_child_stuff): Likewise. > (continue_one_thread): Likewise. > (win32_process_target::resume): Likewise. > (load_psapi): Likewise. > (win32_add_all_dlls): Likewise. > (maybe_adjust_pc): Likewise. > (win32_process_target::qxfer_siginfo): Likewise. > (initialize_low): Likewise. > * win32-low.h (struct win32_target_ops): Change num_regs to > callback function. > --- > v2: > - Stop with error() if any of the WOW64 functions is not available when > debugging WOW64 processes. > > v3: > - Some more comments. > - Error if IsWow64Process fails. > - Removed win32_Wow64SuspendThread since it's not (yet) used. Even if calling SuspendThread to suspend a WOW64 thread from a 64-bits GDB works, we might still want to use Wow64SuspendThread, since it's the "right" thing to do. Either way, this is OK. Simon