public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones
@ 2018-05-04 22:30 sergiodj+buildbot
  2018-05-04 22:35 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: sergiodj+buildbot @ 2018-05-04 22:30 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT a3b60e4588606354b93508a0008a5ca04b68fad8 ***

Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Branch: master
Commit: a3b60e4588606354b93508a0008a5ca04b68fad8

aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones

Some unaligned watchpoints were currently missed.

On old kernels as specified in
	kernel RFE: aarch64: ptrace: BAS: Support any contiguous range (edit)
	https://sourceware.org/bugzilla/show_bug.cgi?id=20207
after this patch some other unaligned watchpoints will get reported as false
positives.

With new kernels all the watchpoints should work exactly.

There may be a regresion that it now less merges watchpoints so that with
multiple overlapping watchpoints it may run out of the 4 hardware watchpoint
registers.  But as discussed in the original thread GDB needs some generic
watchpoints merging framework to be used by all the target specific code.
Even current FSF GDB code does not merge it perfectly.  Also with the more
precise watchpoints one can technically merge them less.  And I do not think
it matters too much to improve mergeability only for old kernels.
Still even on new kernels some better merging logic would make sense.

There remains one issue:
	kernel-4.15.14-300.fc27.armv7hl
	FAIL: gdb.base/watchpoint-unaligned.exp: continue
	FAIL: gdb.base/watchpoint-unaligned.exp: continue
	(gdb) continue
	Continuing.
	Unexpected error setting watchpoint: Invalid argument.
	(gdb) FAIL: gdb.base/watchpoint-unaligned.exp: continue
But that looks as a kernel bug to me.
(1) It is not a regression by this patch.
(2) It is unrelated to this patch.

gdb/ChangeLog
2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves <palves@redhat.com>

	PR breakpoints/19806 and support for PR external/20207.
	* NEWS: Mention Aarch64 watchpoint improvements.
	* aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
	watchpoints and PR external/20207 watchpoints.
	* nat/aarch64-linux-hw-point.c
	(kernel_supports_any_contiguous_range): New.
	(aarch64_watchpoint_offset): New.
	(aarch64_watchpoint_length): Support PR external/20207 watchpoints.
	(aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
	(aarch64_point_is_aligned): Support PR external/20207 watchpoints.
	(aarch64_align_watchpoint): New parameters aligned_offset_p and
	next_addr_orig_p.  Support PR external/20207 watchpoints.
	(aarch64_downgrade_regs): New.
	(aarch64_dr_state_insert_one_point): New parameters offset and
	addr_orig.
	(aarch64_dr_state_remove_one_point): Likewise.
	(aarch64_handle_breakpoint): Update caller.
	(aarch64_handle_aligned_watchpoint): Likewise.
	(aarch64_handle_unaligned_watchpoint): Support addr_orig and
	aligned_offset.
	(aarch64_linux_set_debug_regs): Remove const from state.  Call
	aarch64_downgrade_regs.
	(aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
	* nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
	(DR_CONTROL_MASK): ... this.
	(struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
	(unsigned int aarch64_watchpoint_offset): New prototype.
	(aarch64_linux_set_debug_regs): Remove const from state.
	* utils.c (align_up, align_down): Move to ...
	* common/common-utils.c (align_up, align_down): ... here.
	* utils.h (align_up, align_down): Move to ...
	* common/common-utils.h (align_up, align_down): ... here.

gdb/gdbserver/ChangeLog
2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves <palves@redhat.com>

	* linux-aarch64-low.c (aarch64_stopped_data_address):
	Likewise.

gdb/testsuite/ChangeLog
2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves <palves@redhat.com>

	PR breakpoints/19806 and support for PR external/20207.
	* gdb.base/watchpoint-unaligned.c: New file.
	* gdb.base/watchpoint-unaligned.exp: New file.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-05-06  7:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 22:30 [binutils-gdb] aarch64: PR 19806: watchpoints: false negatives + PR 20207 contiguous ones sergiodj+buildbot
2018-05-04 22:35 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
2018-05-04 23:57 ` Failures on RHEL-s390x-m64, " sergiodj+buildbot
2018-05-05  0:54 ` *** COMPILATION FAILED *** Failures on Fedora-i686, branch master *** BREAKAGE *** sergiodj+buildbot
2018-05-05  0:58 ` Failures on Fedora-x86_64-m64, branch master sergiodj+buildbot
2018-05-05  1:02 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2018-05-05  1:16 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2018-05-05  1:16 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-05-05  1:20 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot
2018-05-05  1:24 ` Failures on Fedora-x86_64-m32, branch master sergiodj+buildbot
2018-05-05  1:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2018-05-05  1:36 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2018-05-05 10:35 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2018-05-05 10:37 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2018-05-06  1:16 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-05-06  5:46 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot
2018-05-06 21:31 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).