]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Really fix Windows gdbserver segment registers
authorTom Tromey <tromey@adacore.com>
Thu, 18 Jan 2024 18:08:45 +0000 (11:08 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 30 Jan 2024 17:18:38 +0000 (10:18 -0700)
commita197d5f7eb27e99c27577558df4274692cafe37e
treebcf0a11b8ac50b0075e4b8e6eaeb0bae3e5fdf1b
parentb960445a45981873c5b1718824ea9d3b5749433a
Really fix Windows gdbserver segment registers

My earlier attempt to mask the segment registers in gdbserver for
Windows introduced some bugs.  That patch is here:

https://sourceware.org/pipermail/gdb-patches/2023-December/205306.html

The problem turned out to be that these fields in the Windows
'CONTEXT' type are just 16 bits, so while masking the values on read
is fine, writing the truncated values back then causes zeros to be
written to some subsequent field.

This patch cleans this up by arranging never to write too much data to
a field.

I also noticed that two register numbers here were never updated for
the 64-bit port.  This patch fixes this as well, and renames the "FCS"
register to follow gdb.

Finally, this patch applies the same treatment to windows-nat.c.

Reviewed-by: John Baldwin <jhb@FreeBSD.org>
gdb/windows-nat.c
gdbserver/win32-i386-low.cc