old-cross-binutils/gdb/config
Yao Qi 554717a3ed Move common aarch64 HW breakpoint/watchpoint code to nat/
When I look at test fails related to watchpoint on aarch64-linux,
I find there are some code duplicates between GDB and GDBserver.
This patch is to move some of them to a nat/aarch64-linux-hw-point.{h,c}.

The only change I do is about the dr_changed_t typedef, which was
ULONGEST in GDB and 'unsigned long long' in GDBserver.  Each bit
of dr_changed_t represents a status of each HW breakpoint or
watchpoint register, and the max number of HW breakpoint or watchpoint
registers is 16, so the width of 'unsigned long long' is sufficient.

gdb:

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

	* Makefile.in (HFILES_NO_SRCDIR): Add
	nat/aarch64-linux-hw-point.h.
	(aarch64-linux-hw-point.o): New rule.
	* nat/aarch64-linux-hw-point.h: New file.
	* nat/aarch64-linux-hw-point.c: New file.
	* aarch64-linux-nat.c: Include nat/aarch64-linux-hw-point.h.
	(AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
	(AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
	(AARCH64_HWP_ALIGNMENT): Likewise.
	(AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
	(AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
	(AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
	(DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
	(DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
	(aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
	(struct aarch64_debug_reg_state): Likewise.
	(struct arch_lwp_info):	Likewise.
	(aarch64_linux_set_debug_regs): Likewise.
	(aarch64_notify_debug_reg_change): Remove static.
	(aarch64_align_watchpoint): Likewise.
	(DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
	(aarch64_watchpoint_length): Likewise.
	(aarch64_point_encode_ctrl_reg): Likewise
	(aarch64_point_is_aligned): Likewise.
	(aarch64_dr_state_insert_one_point): Likewise.
	(aarch64_dr_state_remove_one_point): Likewise.
	(aarch64_handle_breakpoint): Likewise.
	(aarch64_handle_aligned_watchpoint): Likewise.
	(aarch64_handle_unaligned_watchpoint): Likewise.
	(aarch64_handle_watchpoint): Likewise.
	* config/aarch64/linux.mh (NAT_FILE): Add
	aarch64-linux-hw-point.o.

gdb/gdbserver:

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

	* Makefile.in (aarch64-linux-hw-point.o): New rule.
	* configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
	* linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
	(AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
	(AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
	(AARCH64_HWP_ALIGNMENT): Likewise.
	(AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
	(AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
	(aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
	(AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
	(DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
	(DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
	(struct aarch64_debug_reg_state): Likewise.
	(struct arch_lwp_info):	Likewise.
	(aarch64_align_watchpoint): Likewise.
	(DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
	(aarch64_watchpoint_length): Likewise.
	(aarch64_point_encode_ctrl_reg): Likewise
	(aarch64_point_is_aligned): Likewise.
	(aarch64_align_watchpoint): Likewise.
	(aarch64_linux_set_debug_regs):
	(aarch64_dr_state_insert_one_point): Likewise.
	(aarch64_dr_state_remove_one_point): Likewise.
	(aarch64_handle_breakpoint): Likewise.
	(aarch64_handle_aligned_watchpoint): Likewise.
	(aarch64_handle_unaligned_watchpoint): Likewise.
	(aarch64_handle_watchpoint): Likewise.
2015-07-17 14:32:40 +01:00
..
aarch64 Move common aarch64 HW breakpoint/watchpoint code to nat/ 2015-07-17 14:32:40 +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 Revert the previous 7 commits of: Validate binary before use 2015-07-15 20:27:32 +02: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