aboutsummaryrefslogtreecommitdiff
path: root/gdb/i387-tdep.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-11-27 13:53:22 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2023-11-27 13:53:22 -0800
commit66637e209cc836c19a21a28e91046649c7702037 (patch)
tree98f333ed40a872165690234001683d1aca5652db /gdb/i387-tdep.h
parentf1b8ee6f2b4381bc46a0ad4c233b6eddc1e135b5 (diff)
downloadgdb-66637e209cc836c19a21a28e91046649c7702037.zip
gdb-66637e209cc836c19a21a28e91046649c7702037.tar.gz
gdb-66637e209cc836c19a21a28e91046649c7702037.tar.bz2
i386: Use a fallback XSAVE layout for remote targets
If a target provides a target description including registers from the XSAVE extended region, but does not provide an XSAVE layout, use a fallback XSAVE layout based on the included registers. This fallback layout matches GDB's behavior in earlier releases which assumes the layout from Intel CPUs. This fallback layout is currently only used for remote targets since native targets which support XSAVE provide an explicit layout derived from CPUID. PR gdb/30912 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30912 Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/i387-tdep.h')
-rw-r--r--gdb/i387-tdep.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index e149e30..f939fb9 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -147,6 +147,11 @@ extern void i387_supply_fxsave (struct regcache *regcache, int regnum,
extern bool i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
x86_xsave_layout &layout);
+/* Compute an XSAVE layout based on the XCR0 bitmask. This is used
+ as a fallback if a target does not provide an XSAVE layout. */
+
+extern x86_xsave_layout i387_fallback_xsave_layout (uint64_t xcr0);
+
/* Similar to i387_supply_fxsave, but use XSAVE extended state. */
extern void i387_supply_xsave (struct regcache *regcache, int regnum,