Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Hannes Domani <ssbssa@yahoo.de>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>,
	Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] Windows gdb: Fix resetting of the debug-registers bit in ContextFlags
Date: Wed, 22 Jul 2026 16:55:58 +0100	[thread overview]
Message-ID: <c8157c4c-da62-4fbd-a7e4-2fe534de4853@palves.net> (raw)
In-Reply-To: <590795675.1923429.1784732125709@mail.yahoo.com>

On 2026-07-22 15:55, Hannes Domani wrote:

>>> Am Montag, 6. Juli 2026 um 17:02:35 MESZ hat Hannes Domani <ssbssa@yahoo.de> 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


  reply	other threads:[~2026-07-22 15:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <590795675.1923429.1784732125709.ref@mail.yahoo.com>
2026-07-22 14:55 ` Hannes Domani
2026-07-22 15:55   ` Pedro Alves [this message]
     [not found] <1310341683.1974283.1784737131422.ref@mail.yahoo.com>
2026-07-22 16:18 ` Hannes Domani
2026-07-23 19:04   ` Pedro Alves
     [not found] <96f2bcf2-96e5-46ea-9931-c9203415a9df () palves ! net>
2026-07-06 15:01 ` Hannes Domani
2026-07-21 15:02   ` Hannes Domani
2026-07-21 16:51     ` Tom Tromey
2026-07-22 12:24       ` Pedro Alves
2026-07-22 13:40         ` Tom Tromey
     [not found] <20260627142740.3995235-1-ssbssa.ref@yahoo.de>
2026-06-27 14:27 ` Hannes Domani
2026-07-01 19:03   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8157c4c-da62-4fbd-a7e4-2fe534de4853@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox