[Bug gdb/22704] New: TUI reg vector shows blank contents for xmm/ymm vector regs, so does MI interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/22704] New: TUI reg vector shows blank contents for xmm/ymm vector regs, so does MI interface

schwab@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=22704

            Bug ID: 22704
           Summary: TUI reg vector shows blank contents for xmm/ymm vector
                    regs, so does MI interface
           Product: gdb
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: peter at cordes dot ca
  Target Milestone: ---

In x86-64 gdb8.0.1 (on Arch Linux), debugging a 64-bit process, on Linux
4.14.11, GDB doesn't display vector regs at all with  tui reg vec, or with
other front-ends that use the  MI  command interface
(https://github.com/cs01/gdbgui/issues/109).  The x87 regs are also spuriously
shown as changing when stepping over integer instructions (which don't modify
them).

It didn't break this recently, though; it was broken in August with gdb 8.0 and
Linux 4.12, and maybe earlier than that).  My CPU is a Skylake i7-6700k, so
AVX2 is available (in case that has anything to do with it).  I haven't tried
in a VM with AVX disable, because I don't have such a setup.


For example, stopped at a breakpoint:

(gdb) p $ymm0.v32_int8
$4 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0 <repeats 16
times>}

But the TUI window looks like this (edited for width vs my terminal being 129 x
45, but it really is totally blank except for mxcsr)

┌──Register group:
vector───────────────────────────────────────────────────────────┐
│mxcsr          0x1f80   [ IM DM ZM OM UM PM ]                               │
│ymm0           {                                                            │
│ymm1           {                                                            │
│ymm2           {                                                            │
│ymm3           {                                                            │
│ymm4           {                                                            │

tui reg vector  is essentially useless anyway, because there's no choice of
format at all, let alone per-register.  There isn't enough space in one line to
show multiple formats, even with TUI reg sse to limit it to the xmm lower 128
(which also show blank).

I'm mostly reporting this because it's presumably the same root cause that
breaks the MI command interface for front-ends that could usefully display
vector registers.  (In the same way: they display as blank, not even zero.)

With  tui reg mmx, I get   [ No Data Values Displayed ]    in the reg window,
and not even mm0-mm7 labels displayed before the blank lines.  Probably that's
because the FPU was in its default x87 state, not MMX.  I haven't tested with
code that uses MMX.  I notice in tui reg save, if I scroll down the
upper-halves are ymm regs are shows as 0x000000..., while the xmm low halves
are shown as blank.

The TUI reg window works correctly for integer / general registers.

I normally set up a   display /x $xmm0.v8_int16 or whatever to track a few regs
while single-stepping.

This bug is not data-dependent: it's totally reproducible at process startup
when all vector regs are all zero: they still show blank, not zero.

--
You are receiving this mail because:
You are on the CC list for the bug.