[binutils-gdb] Enable hardware watchpoints on attach for aarch64

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Thu Jun 21 13:34:00 GMT 2018


*** TEST RESULTS FOR COMMIT 8363f9d5f2fab2c8b5a25c35c572f0426a716b66 ***

Author: Richard Bunt <richard.bunt@arm.com>
Branch: master
Commit: 8363f9d5f2fab2c8b5a25c35c572f0426a716b66

Enable hardware watchpoints on attach for aarch64

This commit fixes a bug whereby hardware watchpoints are not used on
aarch64 when attaching to a target. The fix adds an aarch64 specialization
of post_attach which records the number of available hardware debug registers
using aarch64_linux_get_debug_reg_capacity. This implementation mirrors that
of aarch64_linux_child_post_startup_inferior which successfully enables the
use of hardware watchpoints when launching the target under the debugger.

gdb/ChangeLog:

	* aarch64-linux-nat.c (post_attach): New.
	(aarch64_linux_nat_target::post_attach): Override post_attach to
	record the number of hardware debug registers.

gdb/testsuite/ChangeLog:

	* gdb.base/watchpoint-hw-attach.c: New test.
	* gdb.base/watchpoint-hw-attach.exp: New file.



More information about the Gdb-testers mailing list