This is the mail archive of the
mailing list for the GDB project.
Re: [rfc, rfa/doc] Multi-threaded watchpoint improvements
Daniel Jacobowitz <email@example.com> writes:
> On Thu, Apr 17, 2008 at 11:52:31AM +0200, Andreas Schwab wrote:
>> Looking closer, it is actually a kernel bug. PTRACE_GETSIGINFO is not
>> emulated for 32-bit processes, so that si_addr is set to the upper half
>> of the address, which is of course zero.
> Glad you could track that down. Yes, my patch made GDB less tolerant
> of targets which claim they can report the stopped data address, but
> actually fail. It will only report watchpoints when the target
> doesn't know what address has changed, or report a changed address
> that falls on a particular watchpoint. This lets us keep track of
> which thread hit each watchpoint.
There is still a problem with that: if the watchpoint granularity is
bigger than the size of the data then gdb can still get this wrong. On
ppc64 the granularity is 8 bytes, so if you watch a 4 byte object you
also get a trap if the other 4 bytes of the watched 8 bytes are
modified, but gdb should ignore that trap. I think there needs to be a
target hook to tell watchpoints_triggered the granularity.
Andreas Schwab, SuSE Labs, firstname.lastname@example.org
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."