From a388ab0b863a07ddb37d1e98ae8e7443ab85746c Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 28 Aug 2023 14:18:19 -0700 Subject: gdb: Store an x86_xsave_layout in i386_gdbarch_tdep. This structure is fetched from the current target in i386_gdbarch_init via a new "fetch_x86_xsave_layout" target method. Approved-By: Simon Marchi --- gdb/target.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/target.h') diff --git a/gdb/target.h b/gdb/target.h index 0cea955..12851f2 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -86,6 +86,7 @@ typedef const gdb_byte const_gdb_byte; #include "disasm-flags.h" #include "tracepoint.h" #include "gdbsupport/fileio.h" +#include "gdbsupport/x86-xstate.h" #include "gdbsupport/break-common.h" /* For enum target_hw_bp_type. */ @@ -1325,6 +1326,10 @@ struct target_ops virtual bool store_memtags (CORE_ADDR address, size_t len, const gdb::byte_vector &tags, int type) TARGET_DEFAULT_NORETURN (tcomplain ()); + + /* Return the x86 XSAVE extended state area layout. */ + virtual x86_xsave_layout fetch_x86_xsave_layout () + TARGET_DEFAULT_RETURN (x86_xsave_layout ()); }; /* Deleter for std::unique_ptr. See comments in @@ -2305,6 +2310,8 @@ extern bool target_fetch_memtags (CORE_ADDR address, size_t len, extern bool target_store_memtags (CORE_ADDR address, size_t len, const gdb::byte_vector &tags, int type); +extern x86_xsave_layout target_fetch_x86_xsave_layout (); + /* Command logging facility. */ extern void target_log_command (const char *p); -- cgit v1.1