aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-linux-nat.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-08-28 14:18:19 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2023-08-28 14:18:19 -0700
commit9848bf83750ba897090320137221977584405e06 (patch)
treeadbfd12b2c6f477c31549718500a2819f8c6fed3 /gdb/x86-linux-nat.h
parentb42405a159450004f2e2497e2b2d81bcac85c947 (diff)
downloadbinutils-9848bf83750ba897090320137221977584405e06.zip
binutils-9848bf83750ba897090320137221977584405e06.tar.gz
binutils-9848bf83750ba897090320137221977584405e06.tar.bz2
gdb: Support XSAVE layouts for the current host in the Linux x86 targets.
Note that this uses the CPUID instruction to determine the total size of the XSAVE register set. If there is a way to fetch the register set size using ptrace that would probably be better. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/x86-linux-nat.h')
-rw-r--r--gdb/x86-linux-nat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/x86-linux-nat.h b/gdb/x86-linux-nat.h
index fcb5f08..a99de6c 100644
--- a/gdb/x86-linux-nat.h
+++ b/gdb/x86-linux-nat.h
@@ -22,6 +22,7 @@
#include "gdb_proc_service.h" /* For ps_err_e. */
#include "linux-nat.h"
+#include "gdbsupport/x86-xstate.h"
#include "x86-nat.h"
#include "nat/x86-linux.h"
@@ -41,6 +42,9 @@ struct x86_linux_nat_target : public x86_nat_target<linux_nat_target>
enum btrace_read_type type) override;
const struct btrace_config *btrace_conf (const struct btrace_target_info *) override;
+ x86_xsave_layout fetch_x86_xsave_layout () override
+ { return m_xsave_layout; }
+
/* These two are rewired to low_ versions. linux-nat.c queries
stopped-by-watchpoint info as soon as an lwp stops (via the low_
methods) and caches the result, to be returned via the normal
@@ -74,6 +78,9 @@ struct x86_linux_nat_target : public x86_nat_target<linux_nat_target>
protected:
/* Override the GNU/Linux inferior startup hook. */
void post_startup_inferior (ptid_t) override;
+
+private:
+ x86_xsave_layout m_xsave_layout;
};