This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]