Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Schimpe, Christina" <christina.schimpe@intel.com>
To: Hannes Domani <ssbssa@yahoo.de>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 7/8] Windows gdb: Implement XState (Intel AVX) support
Date: Fri, 17 Jul 2026 15:26:09 +0000	[thread overview]
Message-ID: <SN7PR11MB763800041C7ECC74D3345F61F9C62@SN7PR11MB7638.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1971012298.3491204.1784299790735@mail.yahoo.com>

> -----Original Message-----
> From: Hannes Domani <ssbssa@yahoo.de>
> Sent: Freitag, 17. Juli 2026 16:50
> To: gdb-patches@sourceware.org; Schimpe, Christina
> <christina.schimpe@intel.com>
> Subject: Re: [PATCH 7/8] Windows gdb: Implement XState (Intel AVX) support
> 
>  Am Freitag, 17. Juli 2026 um 16:16:31 MESZ hat Schimpe, Christina
> <christina.schimpe@intel.com> Folgendes geschrieben:
> 
> > > -----Original Message-----
> > > From: Hannes Domani <ssbssa@yahoo.de>
> > > Sent: Freitag, 17. Juli 2026 15:47
> > > To: gdb-patches@sourceware.org; Schimpe, Christina
> > > <christina.schimpe@intel.com>
> > > Subject: Re: [PATCH 7/8] Windows gdb: Implement XState (Intel AVX)
> > > support
> > >
> > >  Am Freitag, 17. Juli 2026 um 14:54:59 MESZ hat Schimpe, Christina
> > ><christina.schimpe@intel.com> Folgendes geschrieben:
> > >
> > > > Hi Hannes,
> > > >
> > > > Thank you for working on this.
> > > > It appears that this patch uses the same commit message header as
> > > > patch #8. Is it intentional that these are separate commits?
> > >
> > > This one is the gdb part, and #8 is the gdbserver part, that is
> > > stated in the title.
> >
> > Oups, I wonder how I came to that conclusion.  Sorry for that.
> >
> > >
> > > > In any case, IMO, commit messages should not have identical headers.
> > > > Also, this patch seems big enough for a commit message which is
> > > > not header only. :)
> >
> > This part still stands for the commit message. Since it's not only avx
> > registers, I believe it makes sense to share more details here.
> 
> Yes, I will do that.
> 
> 
> > > > Do any AVX-* specific tests pass on Windows now? If so, it would
> > > > be helpful to mention that in the commit message as well.
> > >
> > > I actually planned to add that info, but forgot.
> > >
> > > These tests then pass on Windows:
> > > gdb.arch/i386-avx.exp
> > > gdb.arch/i386-avx512.exp
> >
> > What's the state for SSE  (gdb.arch/i386-sse.exp) ?
> 
> i386-sse.exp works since patch #1, it was only a compile issue of the test
> itself.
> I will mention this in the patch as well.

Thanks.

> 
> > I also saw you introduced some code for PKRU and the shadow stack
> pointer.
> > We have GDB tests for those registers, too:
> > - gdb.arch/i386-pkru.exp
> > - gdb.arch/amd64-shadow-stack*.exp
> 
> For these I just added the equivalent code as is done on Linux, without really
> knowing what they are for.
> 
> i386-pkru.exp tells me:
> 
> (gdb) print have_pkru()
> $1 = 0
> (gdb) PASS: gdb.arch/i386-pkru.exp: probe PKRU support
> UNSUPPORTED: gdb.arch/i386-pkru.exp: processor does not support
> protection key feature.
> 
> Do only certain CPU's have this register?

Most recent CPUs should have it. To be sure you can check if the corresponding bit
is configured in xcr0.
I believe for windows this should be the mask returned by get_xstate_features_mask.

If your cpu does have it, I think you must look at the test in more detail to find out why it's
unsupported. It might need some adaptions for windows.

> 
> And amd64-shadow-stack.exp:
> 
> (gdb) print $pl3_ssp
> $1 = (void *) 0x0
> (gdb) FAIL: gdb.arch/amd64-shadow-stack.exp: test shadow stack support
> 
> No idea if that should work, since Windows is supplying data for the $pl3_ssp
> register.
> 
> 
> Hannes

Without knowing any of the details in windows I believe adding full support for CET shadow
stack might need some more changes. At least for linux, this was the case:
https://inbox.sourceware.org/gdb-patches/20250821171029.1555603-1-christina.schimpe@intel.com/

I believe it would be better to handle this in a separate patch-(series).
This also applies for any other register that you add and whose dedicated test does not pass.

Does that make sense to you?

Christina 
Intel Deutschland GmbH

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2026-07-17 15:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260712113229.3695246-1-ssbssa.ref@yahoo.de>
2026-07-12 11:32 ` [PATCH 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc Hannes Domani
2026-07-12 11:32   ` [PATCH 2/8] Windows gdb: Use allocated buffer for CONTEXT Hannes Domani
2026-07-12 11:32   ` [PATCH 3/8] Windows gdb: Remove mappings member from windows_per_inferior Hannes Domani
2026-07-12 11:32   ` [PATCH 4/8] Windows gdb: Refactor getting pointer to register inside context Hannes Domani
2026-07-12 11:32   ` [PATCH 5/8] Windows gdb: Prepare XState functions Hannes Domani
2026-07-17 14:41     ` Schimpe, Christina
2026-07-17 15:04       ` Hannes Domani
2026-07-17 15:07         ` Hannes Domani
2026-07-17 16:22           ` Schimpe, Christina
2026-07-12 11:32   ` [PATCH 6/8] Windows gdb: Get available XState features Hannes Domani
2026-07-12 11:32   ` [PATCH 7/8] Windows gdb: Implement XState (Intel AVX) support Hannes Domani
2026-07-17 12:54     ` Schimpe, Christina
2026-07-17 13:46       ` Hannes Domani
2026-07-17 14:16         ` Schimpe, Christina
2026-07-17 14:49           ` Hannes Domani
2026-07-17 15:26             ` Schimpe, Christina [this message]
2026-07-17 16:26               ` Hannes Domani
2026-07-17 19:06                 ` Schimpe, Christina
2026-07-18 16:06                   ` Hannes Domani
2026-07-12 11:32   ` [PATCH 8/8] Windows gdbserver: " Hannes Domani

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=SN7PR11MB763800041C7ECC74D3345F61F9C62@SN7PR11MB7638.namprd11.prod.outlook.com \
    --to=christina.schimpe@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.de \
    /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