aboutsummaryrefslogtreecommitdiff
path: root/gold/target-select.h
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-08-04 11:37:57 +0100
committerYao Qi <yao.qi@linaro.org>2016-08-04 11:39:19 +0100
commit6f67973b4280cfd045e632a3340becd16e43b4b1 (patch)
treee76f932c7273ea3102b62119c8fbd16baa676b17 /gold/target-select.h
parentfcd4a73d7dc3505662b4d58489f4c1b8b003b8f3 (diff)
downloadgdb-6f67973b4280cfd045e632a3340becd16e43b4b1.zip
gdb-6f67973b4280cfd045e632a3340becd16e43b4b1.tar.gz
gdb-6f67973b4280cfd045e632a3340becd16e43b4b1.tar.bz2
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.
Diffstat (limited to 'gold/target-select.h')
0 files changed, 0 insertions, 0 deletions