From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8M+YBu3VbF/XBAAAWB0awg (envelope-from ) for ; Thu, 24 Sep 2020 13:22:53 -0400 Received: by simark.ca (Postfix, from userid 112) id 193BB1EE05; Thu, 24 Sep 2020 13:22:53 -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 autolearn=unavailable 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 B853C1E599 for ; Thu, 24 Sep 2020 13:22:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A7303857C52; Thu, 24 Sep 2020 17:22:52 +0000 (GMT) Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id CED163857C52 for ; Thu, 24 Sep 2020 17:22:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CED163857C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=brobecker@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7F5011175FB; Thu, 24 Sep 2020 13:22:49 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VPKJb48NqhP9; Thu, 24 Sep 2020 13:22:49 -0400 (EDT) Received: from takamaka.brobecker.org (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 50E091175B0; Thu, 24 Sep 2020 13:22:49 -0400 (EDT) Received: by takamaka.brobecker.org (Postfix, from userid 1000) id BE261865FC; Thu, 24 Sep 2020 10:22:47 -0700 (PDT) Date: Thu, 24 Sep 2020 10:22:47 -0700 From: Joel Brobecker To: Hannes Domani Subject: Re: [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT Message-ID: <20200924172247.GS4075@adacore.com> 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> <8c6040f0-d21a-40b5-8587-be23a312689c@simark.ca> <153976107.672644.1600967156864@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <153976107.672644.1600967156864@mail.yahoo.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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: , Cc: Simon Marchi , "gdb-patches@sourceware.org" Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > > >>> 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. > > Pushed, thanks. > > I think it would be great to have this in the gdb-10-branch. > Would that be possible? OK for me, Hannes. -- Joel