This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Interaction between HW watchpoints and 'set var'.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 25 Nov 2009 10:06:25 -0800
- Subject: Re: [RFC] Interaction between HW watchpoints and 'set var'.
- References: <20091125175149.BB89D76D99@ppluzhnikov.mtv.corp.google.com>
Interesting. One thing that you don't see is the behavior when using
software watchpoints. My guess is that you'd see the debugger stop
immediately at the first resume because the value looks new to GDB
> Now, I can fix that by installing deprecated_memory_changed_hook,
> but the deprecated part gives me pause.
> Should I create a new memory_changed observer and remove
> deprecated_memory_changed_hook instead?
After reviewing the history of that hook, I think it would be a desired
cleanup to have a memory_changed observer. Once you have the observer,
you'll want to (possibly) re-evaluate the watchpoint value every time
the memory changes. Not sure how to best implement that, but one issue
you might face is when the user is updating the variable value while
it being out of scope... If you manipulate memory blocks exclusively,
then it shouldn't be a problem, but if you re-evaluate using the
watchpoint expression, it might be.