public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb requires watchpoints to fire after the write
@ 2018-08-28 22:08 Tim Newsome
  2018-08-29 15:33 ` Simon Marchi
  0 siblings, 1 reply; 11+ messages in thread
From: Tim Newsome @ 2018-08-28 22:08 UTC (permalink / raw)
  To: gdb

The RISC-V Debug Spec suggests that memory write triggers fire before the
access actually takes place. This allows a user to see what the value in
memory is before it's overwritten. This does not play nice with gdb's
watchpoint expectation, however. When a watchpoint is hit, gdb instantly
reads the memory that it fired on, and if it hasn't changed it silently
lets execution resume. Since on RISC-V the watchpoint fired before the
write actually took place, gdb will always miss the first write because
memory won't have changed yet.

Does that sound right? How should I fix this? With hardware breakpoint
functionality being generally all over the map, I can't imagine this hasn't
come up before.

Thank you,
Tim

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

end of thread, other threads:[~2018-08-31 15:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 22:08 gdb requires watchpoints to fire after the write Tim Newsome
2018-08-29 15:33 ` Simon Marchi
2018-08-29 15:47   ` Joel Brobecker
2018-08-29 15:56     ` Pedro Alves
2018-08-29 16:02     ` Simon Marchi
2018-08-29 17:29       ` Pedro Alves
2018-08-29 20:13         ` Tim Newsome
2018-08-29 20:58         ` Tom Tromey
2018-08-30  8:05           ` Joel Brobecker
2018-08-31 15:37             ` Pedro Alves
2018-08-31 15:13           ` Pedro Alves

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).