public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* ymm register error
@ 2018-07-17 11:44 Paul Topley
  2018-07-17 15:08 ` Simon Marchi
  2018-07-20 10:33 ` Ruslan Kabatsayev
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Topley @ 2018-07-17 11:44 UTC (permalink / raw)
  To: gdb

When trying to run gdb server on a skylake-x HEDT platform (i9-7940X) I encounter the following error:


regcache.c:264: A problem internal to GDBserver has been detected.
Unknown register ymm0h requested

From what I can tell from furious googling is that the ymm registers have changed location from broadwell-e to skylake-x.

I can see references to the ymm registers in gdb's codebase, with apparent positioning related to features like org.gnu.gdb.i386.avx & org.gnu.gdb.i386.avx512.

Being a complete novice around gdb's codebase, I'm not sure if I need to enable or state something at configure stage so that the right ymm register location is referenced.

gdb server 8 in ubuntu bionics repos works OK on the skylake-x platform, but when I compile myself it does not.

Is there something specific I need to be stating at compile time to "get" gdbserver 8 to work on skylake-x

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ymm register error
  2018-07-17 11:44 ymm register error Paul Topley
@ 2018-07-17 15:08 ` Simon Marchi
  2018-07-20 10:33 ` Ruslan Kabatsayev
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2018-07-17 15:08 UTC (permalink / raw)
  To: Paul Topley; +Cc: gdb

On 2018-07-17 07:43, Paul Topley wrote:
> When trying to run gdb server on a skylake-x HEDT platform (i9-7940X)
> I encounter the following error:
> 
> 
> regcache.c:264: A problem internal to GDBserver has been detected.
> Unknown register ymm0h requested
> 
> From what I can tell from furious googling is that the ymm registers
> have changed location from broadwell-e to skylake-x.
> 
> I can see references to the ymm registers in gdb's codebase, with
> apparent positioning related to features like org.gnu.gdb.i386.avx &
> org.gnu.gdb.i386.avx512.
> 
> Being a complete novice around gdb's codebase, I'm not sure if I need
> to enable or state something at configure stage so that the right ymm
> register location is referenced.
> 
> gdb server 8 in ubuntu bionics repos works OK on the skylake-x
> platform, but when I compile myself it does not.
> 
> Is there something specific I need to be stating at compile time to
> "get" gdbserver 8 to work on skylake-x
> 
> Paul

Hi Paul,

I don't have access to a system with this kind of processor, so I can 
only give you pointers on how I would debug this.

My first intuition would be to debug gdbserver, starting at the 
"x86_linux_read_description" function.  There, gdbserver tries to detect 
what features are available on the current processor and create a 
corresponding target description (essentially the list of existing 
registers).  It's possible that it's getting something wrong.  This code 
has also changed in the last few releases, changing from static lists to 
something created more dynamically.  Normally, execution would end up in 
amd64_create_target_description.

You processors supports the AVX instructions and therefore has the ymm0h 
register, so it should enter this condition:

   if (xcr0 & X86_XSTATE_AVX)
     regnum = create_feature_i386_64bit_avx (tdesc, regnum);

But it also has AVX-512, so it should probably also enter this 
condition:

   if (xcr0 & X86_XSTATE_AVX512)
     regnum = create_feature_i386_64bit_avx512 (tdesc, regnum);

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ymm register error
  2018-07-17 11:44 ymm register error Paul Topley
  2018-07-17 15:08 ` Simon Marchi
@ 2018-07-20 10:33 ` Ruslan Kabatsayev
  1 sibling, 0 replies; 3+ messages in thread
From: Ruslan Kabatsayev @ 2018-07-20 10:33 UTC (permalink / raw)
  To: Paul Topley; +Cc: gdb

Hi,

On 17/07/2018, Paul Topley <paul.topley@calnexsol.com> wrote:
> When trying to run gdb server on a skylake-x HEDT platform (i9-7940X) I
> encounter the following error:
>
>
> regcache.c:264: A problem internal to GDBserver has been detected.
> Unknown register ymm0h requested

How exactly do you run it to get this error?

>
> From what I can tell from furious googling is that the ymm registers have
> changed location from broadwell-e to skylake-x.

Broadwell-E doesn't support AVX-512, while Skylake-X does. This might
be the difference, but on Bochs with AVX-512 and XSAVE support enabled
I failed to reproduce your problem. I tried to do it by running
gdbserver from git master on /bin/true and then attaching from another
VT and trying `info all-reg` command. Also `p $ymm0h` and `info reg
ymm0h` commands do succeed for me (as does `info reg zmm0`, which
confirms that AVX-512 support is working).

>
> I can see references to the ymm registers in gdb's codebase, with apparent
> positioning related to features like org.gnu.gdb.i386.avx &
> org.gnu.gdb.i386.avx512.
>
> Being a complete novice around gdb's codebase, I'm not sure if I need to
> enable or state something at configure stage so that the right ymm register
> location is referenced.
>
> gdb server 8 in ubuntu bionics repos works OK on the skylake-x platform, but
> when I compile myself it does not.
>
> Is there something specific I need to be stating at compile time to "get"
> gdbserver 8 to work on skylake-x

I simply configured gdb via `configure --prefix=$HOME/opt/gdb-git`,
without any additional options, and it works as described above. Could
you check that latest git master still has the problem?

>
> Paul
>
>

Regards,
Ruslan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-20 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 11:44 ymm register error Paul Topley
2018-07-17 15:08 ` Simon Marchi
2018-07-20 10:33 ` Ruslan Kabatsayev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).