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 16:26:16 +0200 (IST)
- Subject: Re: [PATCH] Compare contents when evaluating an array watchpoint
On Mon, 7 Oct 2002, Klee Dienes wrote:
> My patch doesn't change the behavior
> of the trigger phase at all --- this phase has always set the trigger
> to watch the entire contents of the array.
IIRC, that's not true: what you call ``the trigger phase'' was watching
the address of the array, not its contents. To watch the contents, you
needed to watch specific array elements.
In other words, "watch my_array" would break when the pointer to
the first element of my_array[] changed to point to a different memory
location. If you want to watch array contents, you need to say
"watch my_array[0]", "watch my_array[1]", etc.
Of course, it's been a while since I looked at that code, so I might be
mistaken. If so, could you please tell where's the code in the current
CVS sources which is watching the entire contents of the array?