]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
[AArch64] SVE/FPSIMD fixup for big endian
authorLuis Machado <luis.machado@linaro.org>
Wed, 18 Mar 2020 16:06:05 +0000 (13:06 -0300)
committerLuis Machado <luis.machado@linaro.org>
Thu, 10 Dec 2020 14:45:08 +0000 (11:45 -0300)
commit6afcd2d4161165fd976c55a9792dbcccd2d5d106
treefb937c4e5014dfc25d5b05162d78f5e13af25f4c
parent15cc148fb817bc1eb91aa16e5d94e39ebafc11ee
[AArch64] SVE/FPSIMD fixup for big endian

The FPSIMD dump in signal frames and ptrace FPSIMD dump in the SVE context
structure follows the target endianness, whereas the SVE dumps are
endianness-independent (LE).

Therefore, when the system is in BE mode, we need to reverse the bytes
for the FPSIMD data.

Given the V registers are larger than 64-bit, I've added a way for value
bytes to be set, as opposed to passing a 64-bit fixed quantity. This fits
nicely with the unwinding *_got_bytes function and makes the trad-frame
more flexible and capable of saving larger registers.

The memory for the bytes is allocated via the frame obstack, so it gets freed
after we're done inspecting the frame.

gdb/ChangeLog:

2020-12-10  Luis Machado  <luis.machado@linaro.org>

* aarch64-linux-tdep.c (aarch64_linux_restore_vreg) New function.
(aarch64_linux_sigframe_init): Call aarch64_linux_restore_vreg.
* aarch64-tdep.h (V_REGISTER_SIZE): Move to ...
* arch/aarch64.h: ... here.
* nat/aarch64-sve-linux-ptrace.c: Include endian.h.
(aarch64_maybe_swab128): New function.
(aarch64_sve_regs_copy_to_reg_buf)
(aarch64_sve_regs_copy_from_reg_buf): Adjust FPSIMD entries.
* trad-frame.c (trad_frame_reset_saved_regs): Initialize
the data field.
(TF_REG_VALUE_BYTES): New enum value.
(trad_frame_value_bytes_p): New function.
(trad_frame_set_value_bytes): New function.
(trad_frame_set_reg_value_bytes): New function.
(trad_frame_get_prev_register): Handle register values saved as bytes.
* trad-frame.h (trad_frame_set_reg_value_bytes): New prototype.
(struct trad_frame_saved_reg) <data>: New field.
(trad_frame_set_value_bytes): New prototype.
(trad_frame_value_bytes_p): New prototype.
gdb/ChangeLog
gdb/aarch64-linux-tdep.c
gdb/aarch64-tdep.h
gdb/arch/aarch64.h
gdb/nat/aarch64-sve-linux-ptrace.c
gdb/trad-frame.c
gdb/trad-frame.h