gdb displays xmm registers poorly on amd64, but works on i386

Konstantin Belousov kostikbel at gmail.com
Thu May 23 06:38:41 UTC 2013


On Wed, May 22, 2013 at 01:16:14PM +1000, Bruce Evans wrote:
> gdb displays all the types even on i386 running FreeBSD-~5.2, where ptrace
> stuff for xmm and i387 registers is different and more deficient than now.
> I think tags translation for i387 registers is still missing in the kernel.
> However, for some versions of the kernel on some arches, gdb never fetches
> the i387 registers directly from the kernel, but fetches the xmm registers
> and does its own translation of everything including tags to i387.  The
> poor display might be caused by ifdef tangles related to this.

The gdb 7.6 on amd64 displays all representations of the xmm registers,
as well as decodes the mxcsr bits:

xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
  uint128 = 0x00000000000000000000000000000000}
...
mxcsr          0x1f80   [ IM DM ZM OM UM PM ]

I did not verified if the last gdb learned to display YMM on AVX-capable
kernels, both for 32 and 64 bits.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-numerics/attachments/20130523/2a93d179/attachment.sig>


More information about the freebsd-numerics mailing list