aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-bsd-nat.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-01-28 11:14:37 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2022-01-28 11:14:37 -0800
commit00d7af046f12f18759b5b2c909d0b4527ac1857e (patch)
treed33e822e40937118700c31faf3a40c527664c7e0 /gdb/x86-bsd-nat.c
parentb95a31ed5d2b34f1a4072d701f5cd51075e61c01 (diff)
downloadgdb-00d7af046f12f18759b5b2c909d0b4527ac1857e.zip
gdb-00d7af046f12f18759b5b2c909d0b4527ac1857e.tar.gz
gdb-00d7af046f12f18759b5b2c909d0b4527ac1857e.tar.bz2
FreeBSD x86 nat: Use register maps for GP register sets.
Rather than using the x86-specific register offset tables, use register maps to describe the layout of the general purpose registers fetched via PT_GETREGS. The sole user-visible difference is that FreeBSD/amd64 will now report additional segment registers ($ds, $es, $fs, and $gs) for both 32-bit and 64-bit processes. As part of these changes, the FreeBSD x86 native targets no longer use amd64-bsd-nat.c or i386-bsd-nat.c. Remove FreeBSD-specific register handling (for $fs_base, $gs_base, and XSAVE state) from these files. Similarly, remove the global x86bsd_xsave_len from x86-bsd-nat.c. The FreeBSD x86 native targets use a static xsave_len instead. While here, rework the probing of PT_GETXMMREGS on FreeBSD/i386. Probe the ptrace op once in the target read_description method and cache the result for the future similar to the way the status of XSAVE support is probed in the read_description method. In addition, return the proper xcr0 mask (X87-only) for old kernels or systems without either XSAVE or XMM support.
Diffstat (limited to 'gdb/x86-bsd-nat.c')
-rw-r--r--gdb/x86-bsd-nat.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/gdb/x86-bsd-nat.c b/gdb/x86-bsd-nat.c
index 06da979..099059a 100644
--- a/gdb/x86-bsd-nat.c
+++ b/gdb/x86-bsd-nat.c
@@ -33,10 +33,6 @@
#include "inf-ptrace.h"
-#ifdef PT_GETXSTATE_INFO
-size_t x86bsd_xsave_len;
-#endif
-
/* Support for debug registers. */
#ifdef HAVE_PT_GETDBREGS