From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QCedMlHLbF+hAwAAWB0awg (envelope-from ) for ; Thu, 24 Sep 2020 12:37:37 -0400 Received: by simark.ca (Postfix, from userid 112) id CC7071EE05; Thu, 24 Sep 2020 12:37:37 -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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED 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 74BD81E599 for ; Thu, 24 Sep 2020 12:37:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07F243857C52; Thu, 24 Sep 2020 16:37:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07F243857C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1600965457; bh=YeMxVoCcPT5xg7CrtlgtdNk5MD8ERCkVnNKBlJrg4+I=; h=Date:To:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HrKJMc2CXzBlISKjWI7D6NEaenbpssEgn1YqYqmFEmhO4QEBH9VqlbekR2UsOiKFg nxYl1hbUuMMFl/QBO5Jm1ejv0xOxBBnKueVOkPIl4dhgQq/Bddm/bW+0znmkPX5XJF c3H+NN0teuCfrxnJzf0VOJe8S1oYd1KUQ0SFB1Yw= Received: from sonic303-20.consmr.mail.ir2.yahoo.com (sonic303-20.consmr.mail.ir2.yahoo.com [77.238.178.201]) by sourceware.org (Postfix) with ESMTPS id AE5AC3857C52 for ; Thu, 24 Sep 2020 16:37:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AE5AC3857C52 X-YMail-OSG: n3lfz_QVM1lZdjiTO0TSHAXHODDPYPj6ljFnrSl82aofkvPZwbAS5SqJ_kg5T9i ZMXoubGCgYzsHFYdvPNOhGxylmoQ5RBeeBMbIq5r05soEFsW_VXDEGGVW6YBFEGDBtq1FMkVQ2U9 QM9X.y074eF7uYGay2xdhS3B_kHg66cDZM.IJghY6ZSnIBXZuJyYWLqd03JwTzZC6Ak5Po0dIpEG u1TzLAd4nDvCojKlI5zLnsfvQv84mpR4UlidszxOsn0BOSFcDjTTLIlDkmxNe2hYwynOhbysajkT 6_H032CXDIuC8ouKmwQe1sN8P13ouE_I2MWHABw.f7Abds8dQLiF9tWC_GMz27T4URZO3MSgeYLy cG07AqnN4fwHbTP86haYf61D3WZqD0q66yvLiuErEbMCFRDCik9KuyhUhbucFKIKB2VKsGNAWPML bwAjkU_vpiOqd47IPGNYmeceWQe7cCcHIr6gelQIzxSF6SzlTDj2h07PK9QozwsX.HJq5qD1ZGae 8Mmi9T.fJTVAePVGIYB7QTBfn4Q.5BCKZA7JUwBFeGGhNO_9XO42XVtFZQoOC9HTPq1GJ5GqNDk3 _yP9Hc2rhmzxdAH2F2zMjXDApHs054MW7jrIeSgtCeJo56EfBIsNlCOtIUpQ4CYcOp9E9oINGB0K 1id4nVEUgqkplk9C4AyXajU.osDwk6LzkN8y32Au_RPu2W8S8SM4haHOnYPHIq_cZZ_72dVgp06a .hEhXNakOMhDnu48AhP2z08N4Qs2dsAlzG0L4WylxPtDl67aZ.HcGoEawh9DpAR5LrKBOg57RIUF rKAVNhKfKqoUWAvbkKuyAlz5jLTNpHhWoQpcvgX9gVxRcLaDLmCE5wgeEr5S2YauCDx8iM8bW1Ee h4nWzi3IQoe1bkMw.RgIukZY.JN5UcK2KVdBmK2nKied0yQEncBgmdSCIhgJMx4LwhKWApTU4hve KN9LpWeiRK2ElAHOoX.q66m5ybhohoZWR39clb3wiz.IoXK3Kr4eSca0krG11i6OUpsMN.5pKE5y LNJ3vUngaxzRtLZeUxgKgLwhrDr1h3NSnoPRhGRL8t_94dExtgCfsCGIns1dn1IyReaHaTctj5ne S5ZLNQeRAstG7XShIISZjj8Vhw5..39xqhF.qhgwPEgRvyWryyr1MIkrr6tTOk.2OJWec1Uza30x tEAZANJPjzPH5rMmE_FdpZBfH_MikFpAXiiiCdMzP7nlYBdM_cqZCa88lN3hTsLnfe8Pvih5YQOd Uh4gmb.tgy.7nyOzkCGoDGPLX1OMAOc3FAuxgdAImipnkkZjXWcRBYV55ybMnMzpSNjRtAywcWKp fKIEMkQPCo36EbKCGDhzNbZ5WF3aj6.mlUHJDcSy4BRf0h4_r3Y71VfXtPB0aeM9DczIjKtgCQiI DNtImF0QZYMvIPV4ToRRGgs4pl2BiY8rgeRazQDIwfyVpyoe55sutsgOBtln1hxxP.Rc2wQREMI8 jZVBFVA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Thu, 24 Sep 2020 16:37:33 +0000 Date: Thu, 24 Sep 2020 16:37:31 +0000 (UTC) To: "gdb-patches@sourceware.org" , Simon Marchi Message-ID: <538186656.652086.1600965451252@mail.yahoo.com> In-Reply-To: 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> Subject: Re: [PATCH 1/3] Handle 64bit breakpoints of WOW64 processes as SIGINT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16674 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0 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: , From: Hannes Domani via Gdb-patches Reply-To: Hannes Domani Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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 *oursta= tus, bool debug_exceptions) > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else if (wow64_process) > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* This breakpoint exceptio= n is triggered for WOW64 processes when > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rea= ching an int3 instruction in 64bit code. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gdb= checks for int3 in case of SIGTRAP, this fails because > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Wow= 64GetThreadContext can only report the pc of 32bit code, and > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gdb= lets the target process continue. > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 So = handle it as SIGINT instead, then the target is stopped > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unc= onditionally.=C2=A0 */ > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG_EXCEPTION_S= IMPLE ("EXCEPTION_BREAKPOINT"); > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rec->ExceptionCod= e =3D DBG_CONTROL_C; > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ourstatus->value.= sig =3D 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? Yes. Hannes