From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RhU7I//ZYGqPmSUAWB0awg (envelope-from ) for ; Wed, 22 Jul 2026 10:55:59 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=OX/uFGbX; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7D30D1E099; Wed, 22 Jul 2026 10:55:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 882141E099 for ; Wed, 22 Jul 2026 10:55:57 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08CD84BA2E38 for ; Wed, 22 Jul 2026 14:55:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08CD84BA2E38 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=OX/uFGbX Received: from sonic307-54.consmr.mail.ir2.yahoo.com (sonic307-54.consmr.mail.ir2.yahoo.com [87.248.110.31]) by sourceware.org (Postfix) with ESMTPS id 542174BA2E07 for ; Wed, 22 Jul 2026 14:55:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 542174BA2E07 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=yahoo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yahoo.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 542174BA2E07 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=87.248.110.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784732132; cv=none; b=xikQKWnMxzNzs0MQvn6VfqLDrFU5pLxh0PCrb1YgA4Qo9+/mmQXAzheu99rea5q7PEJDo3WRoDQdvpVpkJmadTMTT8AX9HJwDMSFbXmYhm4gsvTWdq7Tpy+e6wFQDMnyK0s6nf4tQN8xVVCUhff7pKirqC2Mj7YccQYznLC1VlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784732132; c=relaxed/simple; bh=qoXc9eiiECgi9gAriFH1RuStIJUz3bYwOt3tLnn2GNo=; h=DKIM-Signature:Date:From:To:Message-ID:Subject:MIME-Version; b=pJlvqDmsXNx8FiwvLGbnmR2yEQLvvZUTy0xZIYfqd/4LI4RLv3GmNISxMfwkzMNRiyElD+JNmZVrTr0NyeX9rjkatiEYQmZkzuR1MTENypuBYwv4hOvbhnvjVKgb0Oi1FXhJXIbkv5A72gFN7QlNHPio+yzycHQocv0VNI6z7Qk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=yahoo.de header.i=@yahoo.de header.a=rsa-sha256 header.s=s2048 header.b=OX/uFGbX DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 542174BA2E07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1784732128; bh=qoXc9eiiECgi9gAriFH1RuStIJUz3bYwOt3tLnn2GNo=; h=Date:From:To:References:Subject:From:Subject:Reply-To; b=OX/uFGbX9mt1HwSRKRZJc72uWI9Y3kIGUuQkPXptCWj4FyrPIheNpR3fXivWSwH5kSgqcmzQUU00WN0nwstQwlGs5rf5fg6ymllCCHCy5Ari74FjWgtnV0HYjlQ0x9lZYK6lJP0kf6jeRGX+uEVRE+j6PhNd8SGU9ODLdqlpEdpUPK3/Gv9DazuTjOaE1sGjGAS83nMIP/id2w62RbSHFTMOrAB26VJ1nqrWLzeyfDlSWfY8a3oEUDojv7SpNl4QvyYcIGDYWlVL02gHUths41LhCF7zYbAgjuqet9bk8sUTK85zvnYBLMXifsQvVdpe8DwVMyDyTSEoaA3ygYrg8w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1784732128; bh=j5U7wLP8bgG04qT6d4o0YANms+ls0dTcU3yNcLpp+pG=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=WMPfDEtD3sX1Bsn7Y8s0MjFa3hNR5lwKmPjt1dIGvRhTOywVU6MzoSUbHEGJwDHsDFnWHivicqpWcCTPq+LTejjxb8latpOniEFBrH8TYE6YoUDjxjRtN46saRUmm8BuZyVTO0sikz3Rg1NJaY/unlr31u2ZLZIPHCBqn8Ac8M0Y8JScZj5NqBHlbdEWJbxJChnJivRgTHOMgTbvy2WB67OJAL4Vg6sAzR4pokzAI6tME4nznlfDftsn5gZ9zyk+30yp6FHA9Q2S5UDW3nNBJiw7i+ApnDgD7CEZDywCRtOZkWSmhttIRh9lQimhOWtM1y96OXno7CioIJPb2dMIOg== X-YMail-OSG: OtbpdJQVM1kuKhMEX3Cl9tP.z2W62_1hFd2EMPNCFJ1NJmycXwL5yt3Q3_to1QY BttRsVv4t2gIb19eYLFPjqqaiD9lzHLlbBKW00FZjJpak598SA5.XkI59Oji0q8dl8vzwCzK0P.t kdkump4t3lUumWh5D8qgfK_ZrWC7wWa21ibuvlVQFkNkt9jE_IOyyAQDifRfaryCd6FJRmP52rJf H4qqttdgX2_ljmltOSLK0rZRvxxMTz9HItaLbdbVF75YXnBFcSZcCj1RKO1DlyoEEVdb3jtdyeoA jnP6dULR0MF5xSxTLKBGkWfOvEI7qnKZ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Zd5DweE58Cz9HWz6291xKVxgEWAwff IvDC7a8kf6Jhgz3xpoOEIZbMWAoS1SK.tHQdu2.d4XlPw428.NIC.jGYqRz9n512.EGaAVGzxYEM AralQOfdArz23LDJCH9.KujuCA4Ag6LM49EjPDslJJE4Fi.iwuKnjMf4vLXlyevHw7RtoPlnferR VS9tGQRFkoHXuEM9RkjfDPTmF9vq.okSLEGpXGtzDF8.92CBmyIclM_llHk_M9gMblcMEm0_f1Ig FMFR6jMw65av9v2BeazGZzgExL0Y9_02INjhCxNe.J8dyHRgG9O7Z79KuyNxPc.PquJaxqNQ9JSz XTJBPv6vT4lZVTF6L4wOh8NxJcOOupScdKKKFf70_aY2qwndD4_V8YtXHCZcC1315Xo76DNN_hpS a.Xpf6.lwYYXtyDGtr03L1bVLE682Ic1hLZroq.pJ99zOd5h1_7f0EBi53V8RDlKqwonYDsT5Drs MY8nqbJVP6P9hDntaOyXb_li5rSOHG2Rsb4lnLGqb1.jyh7asb5mwLSj2iVjYCBCy3r8wQrqI.lW b5bgzC4GOUVAPCCxs6PNupXUnDM2qi4ioxEE_WDJb0XZCYaImOwcjMIWJmVNw5sUR89BNH.4WS9S QMz8CVjs7ozT1mwefzsC.QGZgP2LN5h4j6jipN.R53jrwc30VjdxN3MYhM.wLWVpS1HwC8bJRUmV dkTHoA7_dWrGaIKqxenzHcQVq3kALWyeTyTivCiBVbeaKepGk5aeYUWRwkyxJ5B00bdC9ahuLeM7 sN4qQrJr.hbXBzBPFpXtlKkGQRKQbKgpxkurZEe8M0CXh.4lSkUBZ4z8q0yl2hQOFMJP3B7awaxJ Mt2QptElQGiw2aFjty1f5KBDXGwgh6qwjgW.nkn3KMp4N6vvS5nlfT9v.FA-- X-Sonic-MF: X-Sonic-ID: 4cc00276-92a3-4e3a-aa31-0114d3864c71 Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ir2.yahoo.com with HTTP; Wed, 22 Jul 2026 14:55:28 +0000 Date: Wed, 22 Jul 2026 14:55:25 +0000 (UTC) From: Hannes Domani To: Simon Marchi via Gdb-patches , Pedro Alves , Tom Tromey Message-ID: <590795675.1923429.1784732125709@mail.yahoo.com> References: <590795675.1923429.1784732125709.ref@mail.yahoo.com> Subject: Re: [PATCH] Windows gdb: Fix resetting of the debug-registers bit in ContextFlags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.26180 YMailNorrin X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Am Mittwoch, 22. Juli 2026 um 14:24:36 MESZ hat Pedro Alves Folgendes geschrieben: > On 2026-07-21 17:51, Tom Tromey wrote: > >>>>>> "Hannes" =3D=3D Hannes Domani writes: > > > > Hannes>=C2=A0 Ping. > > > > I'd prefer Pedro reply, but FWIW I think the patch looks reasonable. > > You can have my approval but please wait a bit to see if Pedro has some > > other comments. >=C2=A0 > I'm a little confused, since AFAICT, there has been no patch update to ad= dress the > comments I made earlier. >=C2=A0 > We've established that the patch isn't really "fixing" the resetting of r= egisters, as the > missing context flag is ignored anyway.=C2=A0 So at the very least I was = expecting that the subject and commit > log would be updated to match reality. I wasn't waiting for an Approved-By, but i thought you would have some comments to my last mail. > > Am Montag, 6. Juli 2026 um 17:02:35 MESZ hat Hannes Domani Folgendes geschrieben: > > > >> It's just great that all your mails are blocked by yahoo... >=C2=A0 > Sorry, but I don't know what I can do about that.=C2=A0 My hosting provid= er, including email is dreamhost, > which is quite popular and I believe used by others in the community too.= =C2=A0 I don't have anything special > going on with my email AFAIK. I know, it's just very frustrating. Even more so because you recently submitted more windows-related stuff. > >> Am Mittwoch, 1. Juli 2026 um 21:03:09 MESZ hat Pedro Alves Folgendes geschrieben: > >>=C2=A0 > >>> On 2026-06-27 15:27, Hannes Domani wrote: > >>>> The CONTEXT_DEBUG_REGISTERS also includes the arch-specific bit > >>>> (CONTEXT_i386 or CONTEXT_AMD64) which is included in all CONTEXT_* > >>>> defines. > >>>> > >>>> So this basically just checks if any CONTEXT_* define is set: > >>>>=C2=A0 if ((context->ContextFlags & CONTEXT_DEBUG_REGISTERS) !=3D 0) > >>>> > >>>> And similarily, unsetting CONTEXT_DEBUG_REGISTERS removes the > >>>=C2=A0 > >>> similarily =3D> similarly > >>=C2=A0 > >> Right. >=C2=A0 > Can you fix? Yes. > >>>> arch-specific bit as well. > >>>> > >>>> So this creates a CONTEXT_DEBUG_REG_FLAG define with just the > >>>> debug-registers bit, and uses it in these problematic locations. > >>>=C2=A0 > >>> How did you notice this?=C2=A0 Like, GDB was misbehaving and you foun= d the > >>> issue, was it by inspection?=C2=A0 I'd be good to have that info in t= he commit log. > >>=C2=A0 > >> I noticed because I was doing some changes in that function, and > >> CONTEXT_DEBUG_REGISTERS stood out to me very quickly, because for WOW6= 4 I > >> would expect WindowsContext::debug to be used inste= ad. >=C2=A0 > OK.=C2=A0 Can you please add this to the commit log?=C2=A0 That does seem= like something > we need to fix, and should be rationale for the change, right? Will do. > >>>> --- > >>>>=C2=A0 gdb/x86-windows-nat.c | 10 +++++++--- > >>>>=C2=A0 1 file changed, 7 insertions(+), 3 deletions(-) > >>>> > >>>> diff --git a/gdb/x86-windows-nat.c b/gdb/x86-windows-nat.c > >>>> index 27adeb1f154..3368814ed96 100644 > >>>> --- a/gdb/x86-windows-nat.c > >>>> +++ b/gdb/x86-windows-nat.c > >>>> @@ -42,6 +42,10 @@ enum > >>>>=C2=A0 > >>>>=C2=A0 #define DR6_CLEAR_VALUE 0xffff0ff0 > >>>=C2=A0 > >>>>=C2=A0 > >>>> +/* The CONTEXT_DEBUG_REGISTERS define without the arch-specific bit > >>>> +=C2=A0 (CONTEXT_i386 or CONTEXT_AMD64).=C2=A0 */ > >>>> +#define CONTEXT_DEBUG_REG_FLAG 0x10 > >>>> + > >>>=C2=A0 > >>> Did you consider avoiding harcoding numbers, like: > >>>=C2=A0 > >>> #ifdef __x86_64__ > >>> # define CONTEXT_ARCH_BIT CONTEXT_AMD64 > >>> #else > >>> # define CONTEXT_ARCH_BIT CONTEXT_i386 > >>> #endif > >>>=C2=A0 > >>> #define CONTEXT_DEBUG_REG_FLAG (CONTEXT_DEBUG_REGISTERS & ~CONTEXT_AR= CH_BIT) > >>=C2=A0 > >> I did consider this: > >>=C2=A0 > >> #define CONTEXT_DEBUG_REG_FLAG (CONTEXT_DEBUG_REGISTERS & ~CONTEXT_CON= TROL) >=C2=A0 > OK, so why did you decide against it? I didn't really have a good reason, so I'll do it like this in v2. > >> I did some experiments, and it looks like SetThreadContext doesn't car= e at > >> all about the arch bit, so it is working like your original intention. > >> I thought it would fail in the arch bit is missing, but I was wrong ab= out that. > >>=C2=A0 >=C2=A0 > Seeing this, FYI, I didn't know if you planed on dropping the patch, or s= ending an > updated one with a commit log that reflects the finding.=C2=A0 But I didn= 't think the > current one as it was, was ready. This was also a point where I thought you would give some comment, I was wrong about that too. So, when in doubt, I should send an updated patch? Hannes