public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Clear non-significant bits of address in watchpoint
@ 2017-12-08 20:01 sergiodj+buildbot
  2017-12-08 20:01 ` Failures on Fedora-x86_64-m64, branch master sergiodj+buildbot
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sergiodj+buildbot @ 2017-12-08 20:01 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT f17d9474776e50ae47aa71c52211ea6e21adf5d5 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: f17d9474776e50ae47aa71c52211ea6e21adf5d5

Clear non-significant bits of address in watchpoint

Nowadays, GDB can't set watchpoint on tagged address on AArch64,

(gdb) p p2
$1 = (int *) 0xf000fffffffff474
(gdb) watch *((int *) 0xf000fffffffff474)
Hardware watchpoint 2: *((int *) 0xf000fffffffff474)
(gdb) c
Continuing.
main () at
binutils-gdb/gdb/testsuite/gdb.arch/aarch64-tagged-pointer.c:45
45	  void (*func_ptr) (void) = foo;
Unexpected error setting hardware debug registers

This patch is about setting watchpoint on a tagged address.  Unlike
breakpoint, watchpoint record the expression rather than the address, and
when a watchpoint is fired, GDB checks the expression value changed
instead of matching address, so we can mask the watchpoint address by
getting rid of non-significant bits of address.

gdb:

2017-12-08  Yao Qi  <yao.qi@linaro.org>

	* breakpoint.c (update_watchpoint): Call
	address_significant.

gdb/testsuite:

2017-12-08  Yao Qi  <yao.qi@linaro.org>

	* gdb.arch/aarch64-tagged-pointer.c (main): Update.
	* gdb.arch/aarch64-tagged-pointer.exp: Add tests for watchpoint.


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

end of thread, other threads:[~2017-12-08 22:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 20:01 [binutils-gdb] Clear non-significant bits of address in watchpoint sergiodj+buildbot
2017-12-08 20:01 ` Failures on Fedora-x86_64-m64, branch master sergiodj+buildbot
2017-12-08 20:19 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2017-12-08 20:20 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-12-08 20:36 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-12-08 20:37 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2017-12-08 20:49 ` Failures on Fedora-i686, " sergiodj+buildbot
2017-12-08 22:31 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-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).