This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix PTRACE_GETREGSET failure for compat inferiors on arm64


*** TEST RESULTS FOR COMMIT 4bd2e1b2aee122b46e335d932f7833f9c86610d0 ***

Author: Kees Cook <keescook@chromium.org>
Branch: master
Commit: 4bd2e1b2aee122b46e335d932f7833f9c86610d0

Fix PTRACE_GETREGSET failure for compat inferiors on arm64

When running a 32-bit ARM inferior with a 32-bit ARM GDB on a 64-bit
AArch64 host, only VFP registers (NT_ARM_VFP) are available. The FPA
registers (NT_PRFPREG) are not available so GDB must not request them, as
this will fail with -EINVAL.  This is most noticeably exposed when running
"generate-core-file":

(gdb) generate-core-file myprog.core
Unable to fetch the floating point registers.: Invalid argument.

ptrace(PTRACE_GETREGSET, 27642, NT_FPREGSET, 0xffcc67f0) = -1 EINVAL (Invalid argument)

gdb/ChangeLog:

2017-01-27  Kees Cook  <keescook@google.com>

	* gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
	fetch_fpregs if target has fpa registers.
	(arm_linux_store_inferior_registers): Call store_fpregs if target
	has fpa registers.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]