Commit Graph

3 Commits

Author SHA1 Message Date
Richard Bunt 49af4b7012 Remove unstable test output
Changed test output from:
PASS: gdb.base/watchpoint-hw-attach.exp: attach 25501
to
PASS: gdb.base/watchpoint-hw-attach.exp: attach

gdb/testsuite/ChangeLog:

	* gdb.base/watchpoint-hw-attach.exp: Remove unstable output.
2018-06-29 17:34:58 +01:00
Richard Bunt be1b6474f0 Fixed top frame assumption in watchpoint-hw-attach
watchpoint-hw-attach.exp was noticed to fail on some machines.
Thanks to the input from sergiodj and palves on the IRC channel,
it was concluded that the test case incorrectly assumed that on
attach it was landed in the top-most frame of the inferior. This
was fixed by running to a break point in main by explicitly
defining the source file name before continuing with the test.

Tested on the following architectures x86_64, aarch64 and ppc64le.

gdb/testsuite/ChangeLog:

	* gdb.base/watchpoint-hw-attach.c (main): Remove unneeded
	code.
	* gdb.base/watchpoint-hw-attach.exp: Break in outermost frame.
2018-06-28 08:59:59 +01:00
Richard Bunt 8363f9d5f2 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.
2018-06-21 14:09:34 +01:00