diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-01-28 11:14:37 -0800 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-01-28 11:14:37 -0800 |
commit | 00d7af046f12f18759b5b2c909d0b4527ac1857e (patch) | |
tree | d33e822e40937118700c31faf3a40c527664c7e0 /gdb/x86-bsd-nat.h | |
parent | b95a31ed5d2b34f1a4072d701f5cd51075e61c01 (diff) | |
download | gdb-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.h')
-rw-r--r-- | gdb/x86-bsd-nat.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gdb/x86-bsd-nat.h b/gdb/x86-bsd-nat.h index a545ee3..8b6760e 100644 --- a/gdb/x86-bsd-nat.h +++ b/gdb/x86-bsd-nat.h @@ -22,9 +22,6 @@ #include "x86-nat.h" -/* Low level x86 XSAVE info. */ -extern size_t x86bsd_xsave_len; - /* A prototype *BSD/x86 target. */ #ifdef HAVE_PT_GETDBREGS |