binutils-gdb/gdb/config
Yao Qi 607685ecee Native debug arm program by aarch64 GDB
This patch is to let aarch64 GDB debug 32-bit arm program natively.  In
each function for fetching and storing registers, GDB will check
gdbarch_bfd_arch_info (gdbarch)->bits_per_word, if it is 32, call
the corresponding aarch32 functions in aarch32-linux-nat.c, otherwise
fall back to aarch64 code to fetch and store registers.

aarch64_linux_read_description has to return the right target description,
but we don't have gdbarch available there, so GDB fetches auxv and gets
AT_PHENT, in order to determine whether the target is 32-bit or 64-bit.
I learned this trick from solib-svr4.c.

gdb:

2015-07-07  Yao Qi  <yao.qi@linaro.org>

	* aarch32-linux-nat.h (VFP_REGS_SIZE): New macro, moved from
	arm-linux-nat.c.
	* aarch64-linux-nat.c: Include aarch32-linux-nat.h and
	elf/external.h.
	(fetch_gregs_from_thread): Call aarch32_gp_regcache_supply
	if target is 32-bit.
	(store_gregs_to_thread): Call aarch32_gp_regcache_collect
	if target is 32-bit.
	(fetch_fpregs_from_thread): Call aarch32_vfp_regcache_supply
	if target is 32-bit.
	(store_fpregs_to_thread): Call aarch32_vfp_regcache_collect
	if target is 32-bit.
	(tdesc_arm_with_vfpv3, tdesc_arm_with_neon): Declare.
	(aarch64_linux_read_description): Return the right target
	description.
	* arm-linux-nat.c (VFP_REGS_SIZE): Moved to aarch32-linux-nat.h.
	* config/aarch64/linux.mh (NATDEPFILES): Add aarch32-linux-nat.o.
	* configure.tgt (aarch64*-*-linux*): Add arm-tdep.o and
	arm-linux-tdep.o
2015-07-07 16:58:19 +01:00
..
aarch64 Native debug arm program by aarch64 GDB 2015-07-07 16:58:19 +01:00
alpha Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
arm New aarch32-linux-nat.c 2015-07-07 16:58:19 +01:00
djgpp Remove gdb.hp 2015-03-20 17:15:15 +01:00
i386 Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
ia64 Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
m32r Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
m68k Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
m88k * config/alpha/alpha-linux.mt: Remove file. 2007-11-17 00:54:18 +00:00
mips Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
pa Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
powerpc Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
s390 Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
sh * config/alpha/alpha-linux.mt: Remove file. 2007-11-17 00:54:18 +00:00
sparc Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
tilegx Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
vax Remove Vax Ultrix and VAX BSD support 2014-10-24 17:56:56 +01:00
xtensa Introduce nat/linux-namespaces.[ch] 2015-06-10 14:28:43 +01:00
nm-linux.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
nm-nto.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00