aboutsummaryrefslogtreecommitdiff
path: root/gdb/Makefile.in
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-07-17 14:32:40 +0100
committerYao Qi <yao.qi@linaro.org>2015-07-17 14:32:40 +0100
commit554717a3edce7e266d409cd2c9c76d92584ac156 (patch)
tree5a37e4c6a3e17b20ad0f527341b0b163b2407670 /gdb/Makefile.in
parentc67ca4de63fb3018a7e21ec4afe709d4c0dd52c4 (diff)
downloadgdb-554717a3edce7e266d409cd2c9c76d92584ac156.zip
gdb-554717a3edce7e266d409cd2c9c76d92584ac156.tar.gz
gdb-554717a3edce7e266d409cd2c9c76d92584ac156.tar.bz2
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.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r--gdb/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index dfaa8a3..4347d0c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -933,7 +933,7 @@ tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
tui/tui-source.h sol2-tdep.h gregset.h sh-tdep.h sh64-tdep.h \
expression.h score-tdep.h gdb_select.h ser-tcp.h \
-extension.h extension-priv.h \
+extension.h extension-priv.h nat/aarch64-linux-hw-point.h \
build-id.h buildsym.h valprint.h \
typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
@@ -2327,6 +2327,10 @@ linux-namespaces.o: ${srcdir}/nat/linux-namespaces.c
$(COMPILE) $(srcdir)/nat/linux-namespaces.c
$(POSTCOMPILE)
+aarch64-linux-hw-point.o: ${srcdir}/nat/aarch64-linux-hw-point.c
+ $(COMPILE) $(srcdir)/nat/aarch64-linux-hw-point.c
+ $(POSTCOMPILE)
+
#
# gdb/tui/ dependencies
#