This is the mail archive of the gdb@sourceware.org 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: Watchpoints with condition


On Tue, 2007-12-04 at 10:25 +0300, Vladimir Prus wrote:
> On Tuesday 04 December 2007 04:50:50 Michael Snyder wrote:
> > On Fri, 2007-11-30 at 19:25 +0300, Vladimir Prus wrote:
> > > GDB presently allow a watchpoint to have a condition, and I wonder
> > > what are the use-cases for that.
> > > 
> > > If anybody has used watchpoint in condition in practice when debugging
> > > real problem (as opposed to just playing with gdb, or making up
> > > possible uses), can he share why it was needed?
> > 
> > 
> > May I ask, what prompts the question?
> > Were you thinking of getting rid of it?
> 
> I'm merely trying to understand the use cases. One of the specific
> concern is what happens if a watchpoint's condition refers to a global
> variable in a library that is unloaded and if that scenario is of
> interest to anybody.

I see.  Thanks.

In terms of the specific scenario you describe, is that any
different from a conditional breakpoint that refers to a global
from an unloaded library?

My understanding (and I may be wrong) is that the conditional
is not evaluated until the breakpoint is hit.  Is it different
for a watchpoint?   Ah, wait, I think I see -- it's different
for a SOFTWARE watchpoint, isn't it?




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