mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
Fix ARMv8.1/v8.2 for hw watchpoint and breakpoint
The problem here is ARMv8.1 (and ARMv8.2) define a different debug version than ARMv8 (7 and 8 respectively). This fixes hw watchpoints and breakpoints by checking for those debug versions too. Committed as obvious after a test on aarch64-linux-gnu (on a ThunderX machine which has ARMv8.1 support enabled). ChangeLog: * nat/aarch64-linux-hw-point.c (aarch64_linux_get_debug_reg_capacity): Handle ARMv8.1 and ARMv8.2 debug versions. * nat/aarch64-linux-hw-point.h (AARCH64_DEBUG_ARCH_V8_1): New define. (AARCH64_DEBUG_ARCH_V8_2): New define. Signed-off-by: Andrew Pinski <apinski@cavium.com>
This commit is contained in:
@ -630,7 +630,9 @@ aarch64_linux_get_debug_reg_capacity (int tid)
|
||||
|
||||
/* Get hardware watchpoint register info. */
|
||||
if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_WATCH, &iov) == 0
|
||||
&& AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
|
||||
&& (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
|
||||
|| AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
|
||||
|| AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
|
||||
{
|
||||
aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
|
||||
if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
|
||||
@ -650,7 +652,9 @@ aarch64_linux_get_debug_reg_capacity (int tid)
|
||||
|
||||
/* Get hardware breakpoint register info. */
|
||||
if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_BREAK, &iov) == 0
|
||||
&& AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
|
||||
&& (AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8
|
||||
|| AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_1
|
||||
|| AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8_2))
|
||||
{
|
||||
aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
|
||||
if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
|
||||
|
Reference in New Issue
Block a user