Return zero in aarch64_linux_can_use_hw_breakpoint if target doesn't support HW watch...
authorYao Qi <yao.qi@linaro.org>
Thu, 23 Jul 2015 10:22:34 +0000 (11:22 +0100)
committerYao Qi <yao.qi@linaro.org>
Thu, 23 Jul 2015 10:22:34 +0000 (11:22 +0100)
commitc2fbdc5901a9220d0953f14c27760c3d3ae13074
treebdf1407b9eff8671755ab2ddbf299e73fd36712f
parent070fe95d07c78349f0c8f0fa90aeb92d05248483
Return zero in aarch64_linux_can_use_hw_breakpoint if target doesn't support HW watchpoint/breakpoint

Nowadays aarch64_linux_can_use_hw_breakpoint always return one, but it
can be smarter, say, if GDB knows target doesn't support HW watchpoint
or breakpoint because HW watchpoint/breakpoint is disabled in linux
kernel, for example, it can safely return zero.

gdb:

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

* aarch64-linux-nat.c (aarch64_linux_can_use_hw_breakpoint): If
TYPE is watchpoint, return zero if aarch64_num_wp_regs is zero.
If TYPE is breakpoint, return zero if arch64_num_bp_regs is zero.
gdb/ChangeLog
gdb/aarch64-linux-nat.c