From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jVjQDHvMbF8NBAAAWB0awg (envelope-from ) for ; Thu, 24 Sep 2020 12:42:35 -0400 Received: by simark.ca (Postfix, from userid 112) id 2162E1EE05; Thu, 24 Sep 2020 12:42:35 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 787301E599 for ; Thu, 24 Sep 2020 12:42:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8CC73857C52; Thu, 24 Sep 2020 16:42:33 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id E90BA3857C52 for ; Thu, 24 Sep 2020 16:42:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E90BA3857C52 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.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 927D81E599; Thu, 24 Sep 2020 12:42:31 -0400 (EDT) Subject: Re: [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT To: Hannes Domani , "gdb-patches@sourceware.org" References: <20200923172122.2089-1-ssbssa.ref@yahoo.de> <20200923172122.2089-1-ssbssa@yahoo.de> <0ce3a433-4256-93e9-8843-57cd5f28ba73@simark.ca> <2023373258.594579.1600961165295@mail.yahoo.com> <538186656.652086.1600965451252@mail.yahoo.com> From: Simon Marchi Message-ID: <8c6040f0-d21a-40b5-8587-be23a312689c@simark.ca> Date: Thu, 24 Sep 2020 12:42:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <538186656.652086.1600965451252@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-09-24 12:37 p.m., Hannes Domani via Gdb-patches wrote: > Am Donnerstag, 24. September 2020, 17:29:50 MESZ hat Simon Marchi Folgendes geschrieben: > >> On 2020-09-24 11:26 a.m., Hannes Domani wrote: >>> Is it ok with this addition?: >>> >>> diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c >>> index a277156138..2cbbc0f2cc 100644 >>> --- a/gdb/nat/windows-nat.c >>> +++ b/gdb/nat/windows-nat.c >>> @@ -243,6 +243,13 @@ handle_exception (struct target_waitstatus *ourstatus, bool debug_exceptions) >>> } >>> else if (wow64_process) >>> { >>> + /* This breakpoint exception is triggered for WOW64 processes when >>> + reaching an int3 instruction in 64bit code. >>> + gdb checks for int3 in case of SIGTRAP, this fails because >>> + Wow64GetThreadContext can only report the pc of 32bit code, and >>> + gdb lets the target process continue. >>> + So handle it as SIGINT instead, then the target is stopped >>> + unconditionally. */ >>> DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT"); >>> rec->ExceptionCode = DBG_CONTROL_C; >>> ourstatus->value.sig = GDB_SIGNAL_INT; >> >> That is fine with me, thanks. >> >> Just to make sure I understand, stopping a 32-bit process from a 64-bit >> GDB is the only time we expect this to happen, right? Ok, thanks. Please go ahead and merge. Simon