Re: [PATCH 1/1] gdb, gdbserver: Add Intel APX register support

Keith Seitz <[email protected]>
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
On 8/25/26 9:11 AM, Joos, Christina wrote:
> I just found a bug in this area:
> https://sourceware.org/bugzilla/show_bug.cgi?id=34561
> 
> Assuming a fix like the one indicated in comment of the bug will be merged
> before this patch I think we can add something like this on top:
> 
> ~~~
> diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
> index 51459c31dcc..51180714e08 100644
> --- a/gdb/i387-tdep.c
> +++ b/gdb/i387-tdep.c
> @@ -955,6 +955,8 @@ i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
>           Otherwise, we are not able to read xsave registers in OS generated
>           corefiles.  */
>         layout.avx_offset = 576;
> +      /* Intel APX can be available on CPUs with PKRU including AMX or not
> +        including AMX support.  */
>         layout.apx_offset = 960;
>         layout.k_offset = 1088;
>         layout.zmm_h_offset = 1152;
> @@ -974,6 +976,7 @@ i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
>       {
>         /* Intel CPUs supporting AVX512.  */
>         layout.avx_offset = 576;
> +      /* Intel APX can be available on CPUs supporting AVX512.  */
>         layout.apx_offset = 960;
>         layout.k_offset = 1088;
>         layout.zmm_h_offset = 1152;
> ~~~
> 
> Or do you have a different comment in mind?

I am satisfied with that. Thank you.

> My original plan was to post this patch once again including the fixes for Eli's
> feedback + ones pointed out by me here
> https://sourceware.org/pipermail/gdb-patches/2026-August/229759.html
> and then wait 1-2 weeks and merge it if there is no more feedback.
> Since it's only in the x86 area I think it should be fine for me to self-approve here.
>   
> However, in the meantime this bug mentioned above popped up.
> I think it makes sense to wait until this is resolved.
FWIW, I think you've got a better handle on all of the issues
at play than I do, so I trust you'll Do The Right Thing (TM).

Keith
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.