This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc, rfa/doc] Multi-threaded watchpoint improvements
> From: Andreas Schwab <schwab@suse.de>
> Date: Wed, 23 Apr 2008 13:15:47 +0200
>
> Here's a patch. OK?
>
> Andreas.
>
> 2008-04-23 Andreas Schwab <schwab@suse.de>
>
> * target.h (struct target_ops): Add
> to_watchpoint_addr_within_range.
> (target_watchpoint_addr_within_range): New function.
> * target.c (update_current_target): Inherit
> to_watchpoint_addr_within_range, defaulting to
> default_watchpoint_addr_within_range.
> (default_watchpoint_addr_within_range): New function.
> (debug_to_watchpoint_addr_within_range): New function.
> (setup_target_debug): Set to_watchpoint_addr_within_range.
> * ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
> New function.
> (_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
> * breakpoint.c (watchpoints_triggered): Use
> target_watchpoint_addr_within_range.
>
> doc/:
> * gdbint.texinfo (Algorithms): Describe
> target_watchpoint_addr_within_range.
The patch to gdbint.texinfo is approved, with one comment:
> +Check whether @var{addr} (as returned by target_stopped_data_address)
target_stopped_data_address should have the @code markup, since it's a
C symbol.
> + This only needs to be provided if the
> +granularity of a watchpoint is greater than one byte
Strictly speaking, I think it's needed only if watchpoint's
granularity is greater than the granularity of data addresses, but
that's nitpicking.