diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-07-17 14:32:40 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-07-17 14:32:40 +0100 |
commit | 554717a3edce7e266d409cd2c9c76d92584ac156 (patch) | |
tree | 5a37e4c6a3e17b20ad0f527341b0b163b2407670 /gdb/ChangeLog | |
parent | c67ca4de63fb3018a7e21ec4afe709d4c0dd52c4 (diff) | |
download | gdb-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/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b1f9586..3bd64ab 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,40 @@ 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. + +2015-07-17 Yao Qi <yao.qi@linaro.org> + * aarch64-linux-nat.c (aarch64_handle_breakpoint): Add argument state and don't call aarch64_get_debug_reg_state. All callers update. |