This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Compare contents when evaluating an array watchpoint
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- To: Klee Dienes <klee at apple dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 7 Oct 2002 07:53:26 +0200 (IST)
- Subject: Re: [PATCH] Compare contents when evaluating an array watchpoint
On Sun, 6 Oct 2002, Klee Dienes wrote:
> The following patch allows one to set watchpoints on arrays, and have
> the watchpoint triggered if any element in the array changes. Without
> the patch, the C value_equal semantics causes the address of the array
> to be checked for change, not the contents --- resulting in a
> watchpoint that can never be hit.
>
> This is particularly useful if one wants to do commands like watch
> {char[80]} 0xfff0000, or similar, in order to watch an arbitrary region
> of memory.
What will this do to hardware watchpoints on arrays/array elements? On
many platforms, hardware watchpoints have size limitations, so large
arrays cannot be watched in their entirety.