aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-debug.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
commita388ab0b863a07ddb37d1e98ae8e7443ab85746c (patch)
tree9bb1a51cd7e8cd1d955ecac026342577a13d2cd7 /gdb/target-debug.h
parentd39b60f2e036f4af7224adf06c2d70bb3f8f71f3 (diff)
downloadgdb-a388ab0b863a07ddb37d1e98ae8e7443ab85746c.zip
gdb-a388ab0b863a07ddb37d1e98ae8e7443ab85746c.tar.gz
gdb-a388ab0b863a07ddb37d1e98ae8e7443ab85746c.tar.bz2
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 <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/target-debug.h')
-rw-r--r--gdb/target-debug.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/target-debug.h b/gdb/target-debug.h
index 082550d..a028d2b 100644
--- a/gdb/target-debug.h
+++ b/gdb/target-debug.h
@@ -242,4 +242,24 @@ target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
{
target_debug_print_const_gdb_byte_vector_r (vector);
}
+
+static void
+target_debug_print_x86_xsave_layout (const x86_xsave_layout &layout)
+{
+ gdb_puts ("{", gdb_stdlog);
+ gdb_printf (gdb_stdlog, " sizeof_xsave=%d", layout.sizeof_xsave);
+#define POFFS(region) \
+ if (layout.region##_offset != 0) \
+ gdb_printf (gdb_stdlog, ", %s_offset=%d", #region, \
+ layout.region##_offset)
+ POFFS(avx);
+ POFFS(bndregs);
+ POFFS(bndcfg);
+ POFFS(k);
+ POFFS(zmm_h);
+ POFFS(zmm);
+ POFFS(pkru);
+#undef POFFS
+ gdb_puts (" }", gdb_stdlog);
+}
#endif /* TARGET_DEBUG_H */