diff options
author | John Baldwin <jhb@FreeBSD.org> | 2023-08-28 14:18:19 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2023-08-28 14:18:19 -0700 |
commit | c689d1fe58b2c0faf51e4f574d50271f1d0648e3 (patch) | |
tree | a9d6bb2b8f2485874a9d4ec24b079a21dd11fde8 /gdb/gdbarch_components.py | |
parent | a388ab0b863a07ddb37d1e98ae8e7443ab85746c (diff) | |
download | binutils-c689d1fe58b2c0faf51e4f574d50271f1d0648e3.zip binutils-c689d1fe58b2c0faf51e4f574d50271f1d0648e3.tar.gz binutils-c689d1fe58b2c0faf51e4f574d50271f1d0648e3.tar.bz2 |
core: Support fetching x86 XSAVE layout from architectures.
Add gdbarch_core_read_x86_xsave_layout to fetch the x86 XSAVE layout
structure from a core file.
Current OS's do not export the offsets of XSAVE state components in
core dumps, so provide an i387_guess_xsave_layout helper function to
set offsets based on known combinations of XCR0 masks and total state
sizes. Eventually when core dumps do contain this information this
function should only be used as a fall back for older core dumps.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/gdbarch_components.py')
-rw-r--r-- | gdb/gdbarch_components.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 23e5789..846467b 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -1709,6 +1709,17 @@ of bytes read (zero indicates EOF, a negative value indicates failure). predicate=True, ) +Method( + comment=""" +Read x86 XSAVE layout information from core file into XSAVE_LAYOUT. +Returns true if the layout was read successfully. +""", + type="bool", + name="core_read_x86_xsave_layout", + params=[("x86_xsave_layout &", "xsave_layout")], + predicate=True, +) + Value( comment=""" BFD target to use when generating a core file. |