This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Determine target description for native aarch64
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 04 Aug 2016 07:10:44 -0400
- Subject: [binutils-gdb] Determine target description for native aarch64
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 6f67973b4280cfd045e632a3340becd16e43b4b1 ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 6f67973b4280cfd045e632a3340becd16e43b4b1
Determine target description for native aarch64
I find the following test fail when I test native aarch64 gdb with
arm program,
(gdb) PASS: gdb.base/attach-pie-noexec.exp: attach
set architecture arm^M
warning: Selected architecture arm is not compatible with reported target architecture aarch64^M
Architecture `arm' not recognized.^M
The target architecture is set automatically (currently aarch64)^M
(gdb) FAIL: gdb.base/attach-pie-noexec.exp: set architecture arm
GDB thinks the target is aarch64, but it isn't. Nowadays, we are
using some entries AT_PHENT and AT_HWCAP in auxv to determine whether
the process is a 32-bit arm one or 64-bit aarch64 one, and get the
right gdbarch. However, in the process of parsing auxv (in
inf_ptrace_auxv_parse), the size of int and data pointer of
target_gdbarch is used. If debug program exists (in most of cases),
target_gdbarch is already set according to the debug program, which
is arm in my case. Then, GDB can parse auxv successfully. However,
in gdb.base/attach-pie-noexec.exp, the debug program is removed,
target_gdbarch is aarch64 when GDB parse auxv, so GDB can't parse
it successfully.
Instead of using auxv, we check the return value of ptrace NT_ARM_VFP.
If the program is an arm process, NT_ARM_VFP is OK, otherwise, error
is returned.
Additionally, we only return tdesc_arm_with_neon for arm process,
because neon is mandatory on ARMv8.
gdb:
2016-08-04 Yao Qi <yao.qi@linaro.org>
* aarch64-linux-nat.c (tdesc_arm_with_vfpv3): Remove the
declaration.
(aarch64_linux_read_description): Remove code on getting
auxv and select target description on it. Select target
description by the result of NT_ARM_VFP ptrace request.
- Follow-Ups:
- Failures on Fedora-x86_64-m32, branch master
- *** COMPILATION FAILED *** Failures on Debian-s390x-native-gdbserver-m64, branch master *** BREAKAGE ***
- Failures on Debian-i686, branch master
- Failures on Fedora-i686, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64le-m64, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master