mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-17 07:40:07 +08:00
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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user