From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0RMKMyvoYGr03iUAWB0awg (envelope-from ) for ; Wed, 22 Jul 2026 11:56:27 -0400 Received: by simark.ca (Postfix, from userid 112) id B670D1E09E; Wed, 22 Jul 2026 11:56:27 -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.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, 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 088CE1E033 for ; Wed, 22 Jul 2026 11:56:27 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E6BA4BA2E28 for ; Wed, 22 Jul 2026 15:56:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E6BA4BA2E28 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by sourceware.org (Postfix) with ESMTPS id BB8074BA2E0B for ; Wed, 22 Jul 2026 15:56:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BB8074BA2E0B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BB8074BA2E0B Authentication-Results: sourceware.org; arc=none smtp.remote-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784735760; cv=none; b=n5Y5jrt+9kV4Xbl5FgNcAWuPTkuUIkSHmoX22equtWr35qofXL8U5yrKr9eHZe+3DvwYRrKqcomC61gEwArXbSx+A6dyils0FYOK+oPmE6mACSRifE5cLb93+W2M0SwDFEdoPJozEFsmDS/+Bpo2m9Ds8gwv5KIsABlNw0nuYRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784735760; c=relaxed/simple; bh=Lb8ZnAPeb57yBLkegrSCcKeOFUo9f8oLTQGMz0n54hE=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=Mcoydto3rmsX334jVPAscBQnHz5cI/3Qw4X4jyj7Jk1JtjuyJXkY7RPw0HsJlgMZKBMIdnhNHD2uAbQetUiuEuMO8ShxC3Vz93bHVxXKOh47HQ1IahPMs7Jnti/Bs4img/nDZIdfh98VBBuoTf7pOTXWXvABbfPvk9Be8uZ0CDo= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB8074BA2E0B Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-47f707e5d75so2622272f8f.1 for ; Wed, 22 Jul 2026 08:56:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784735759; x=1785340559; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=F1L2oap18gjZMntW7L+FJaDSUO1xcCivvXwgbijhbVU=; b=VTDC744ZVp1X7pA0uipQQux63WccuCZQEa6jTWcBWJ3yx/RDbI3yRLqM5n9W6vPx05 bXwN+GycMBw5xXo/G7J0hK01TG5Wicxj1MWDW7AXARJ+kMQqXu1xxF4C78CqbzTaWlCS TvbXIu/+qGEqmi5U80FRg6CpWj5olCFVHF9Cx/qMA6kjX9FZJl1yaQM6qEW+ouEzfm0H 3qB0XIocU9o3Kd50AVhhZCuddWxhMvDf7JHPMOiDUI38m8SWGlOpRxScLhUhDyPEwVGs gufpSV3KCOo0gMiq8eCkXALF9/gsksajbsH1mZjQ7TCyPElbNHgwW43R08+6+aT/ouQ+ s9ig== X-Forwarded-Encrypted: i=1; AHgh+RpoDhOB0fjUAQJ+zvvdlP8nZoZqo0mlM3FJk2ju3u3NbB5PE6Mrgqeq3c8Q5WYWvgVMPaswd0UWZke70A==@sourceware.org X-Gm-Message-State: AOJu0Yw79Tm/dnsA9u38/7rtYRQzqu4Za6DLON0TlYSYT71B2UtTrbo7 XFEz8IdFBV/u49CVcnQfe/OGSqPBMeS3WPgxp5wkYOV9VkXnZ1IzfMZ8OWFADgBl X-Gm-Gg: AR+sD13ppkkJdvUQe+lhcT3yDy/l6GkqWwbhdvfFEtqLZZK3pbs+jfA54QCp3FJEW3h BE7so5ZeJ29ufbx2pSnK8qkiflYwoLzAdDgFfxuAJBKRMTvpM6F52ugwErqT6tod0B4tIZHEEFX eSQzu8dyvI0JpC/Zj+q5jTslK0a6+/OMqARZtw1Etnn01Pq/x6d/ewjsYhNkAMqOfImgllVOXx/ 1Fg7h2uHOpa5O3o2u2saCFWeFEDvyjG+6lcfQIGVFKPWA6mAtdTu9NiwH6MVG/QcOWmapSVyFqr RnU8TK9kZDl/ocm7ctM+SAR9SMVadMEBrZp81jb5SbVNyEg1Urd8HQu9gFlW3AAVmuHj7Mj7X/P reHqQbzNZRb4yoVn0yVm3xtcIl6/0Dnm9wK8hbKafk90mX3gOfUNovAZuWj9sDJXv1wtlvBWPG2 M38jYGDyFLag18f3qFNiv/+AF+tet6NEq3W/mUsC2cwBse X-Received: by 2002:a5d:5888:0:b0:47f:8887:3b07 with SMTP id ffacd0b85a97d-47f888745b1mr2670140f8f.13.1784735759508; Wed, 22 Jul 2026 08:55:59 -0700 (PDT) Received: from ?IPV6:2001:8a0:fae3:3700:29ae:9c1e:45d9:1a25? ([2001:8a0:fae3:3700:29ae:9c1e:45d9:1a25]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85bd850asm6901830f8f.15.2026.07.22.08.55.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jul 2026 08:55:59 -0700 (PDT) Message-ID: Date: Wed, 22 Jul 2026 16:55:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Windows gdb: Fix resetting of the debug-registers bit in ContextFlags To: Hannes Domani , Simon Marchi via Gdb-patches , Tom Tromey References: <590795675.1923429.1784732125709.ref@mail.yahoo.com> <590795675.1923429.1784732125709@mail.yahoo.com> From: Pedro Alves Content-Language: en-US In-Reply-To: <590795675.1923429.1784732125709@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 On 2026-07-22 15:55, Hannes Domani wrote: >>> 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... >>   >> Sorry, but I don't know what I can do about that.  My hosting provider, including email is dreamhost, >> which is quite popular and I believe used by others in the community too.  I don't have anything special >> going on with my email AFAIK. > > I know, it's just very frustrating. Is this only about emails sent to the mailing list, i.e., ones that are sent to you by sourceware's Mailman, not me directly? Do you receive the direct copy when I To: you directly, like this one? > Even more so because you recently submitted more windows-related stuff. FWIW, I subscribe to the mailing list using my gmail account, but nobody ever sees that, because I always respond with my palves.net email address. I use Thunderbird, and there the "Correct Identify" add-on is super useful for this -- I have it set up to that when I reply to an email from the sourceware domain that I received on the gmail inbox, the thunderbird email writing windows automatically pops with with my palves.net address as the default sender. In a nutshell, I freeload on gmail as my public mailing list storage. It's all archived public messages, so I'm fine with that. :-) If this is only about the mailing list emails, maybe a setup like that would work for you, too. > >>>>>> --- >>>>>>   gdb/x86-windows-nat.c | 10 +++++++--- >>>>>>   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 >>>>>>   >>>>>>   #define DR6_CLEAR_VALUE 0xffff0ff0 >>>>>   >>>>>>   >>>>>> +/* The CONTEXT_DEBUG_REGISTERS define without the arch-specific bit >>>>>> +  (CONTEXT_i386 or CONTEXT_AMD64).  */ >>>>>> +#define CONTEXT_DEBUG_REG_FLAG 0x10 >>>>>> + >>>>>   >>>>> Did you consider avoiding harcoding numbers, like: >>>>>   >>>>> #ifdef __x86_64__ >>>>> # define CONTEXT_ARCH_BIT CONTEXT_AMD64 >>>>> #else >>>>> # define CONTEXT_ARCH_BIT CONTEXT_i386 >>>>> #endif >>>>>   >>>>> #define CONTEXT_DEBUG_REG_FLAG (CONTEXT_DEBUG_REGISTERS & ~CONTEXT_ARCH_BIT) >>>>   >>>> I did consider this: >>>>   >>>> #define CONTEXT_DEBUG_REG_FLAG (CONTEXT_DEBUG_REGISTERS & ~CONTEXT_CONTROL) >>   >> 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. Hmm, I hadn't looked at CONTEXT_CONTROL's definition before. I did now: #define CONTEXT_AMD64 0x100000 #define CONTEXT_CONTROL (CONTEXT_AMD64 | __MSABI_LONG(0x1)) So it's more then the arch bit? Is that really correct to use here? > > >>>> I did some experiments, and it looks like SetThreadContext doesn't care 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 about that. >>>>   >>   >> Seeing this, FYI, I didn't know if you planed on dropping the patch, or sending an >> updated one with a commit log that reflects the finding.  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? > I'm not sure we can come up with a rule. :-) I guess what I missed is a question instead of a statement. I'll try to avoid assuming as much too. Cheers, Pedro Alves