public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb@sources.redhat.com
Subject: Re: Watchpoints with condition
Date: Tue, 04 Dec 2007 10:48:00 -0000	[thread overview]
Message-ID: <1196764468.2501.277.camel@localhost.localdomain> (raw)
In-Reply-To: <200712041025.15416.vladimir@codesourcery.com>

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?



  reply	other threads:[~2007-12-04 10:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30 16:25 Vladimir Prus
2007-11-30 16:37 ` Daniel Jacobowitz
2007-11-30 21:16 ` Eli Zaretskii
2007-11-30 23:30   ` Jim Blandy
2007-11-30 23:49     ` Daniel Jacobowitz
2007-12-03 17:54       ` Jim Blandy
2007-12-03 18:11         ` Daniel Jacobowitz
2007-12-03 20:59         ` Eli Zaretskii
2007-12-03 23:07           ` Jim Blandy
2007-12-04  4:23             ` Eli Zaretskii
2007-12-04  5:11               ` Michael Snyder
2007-12-04 17:24                 ` Jim Blandy
2007-12-04 17:30                   ` Paul Koning
2007-12-04 21:07                   ` Eli Zaretskii
2007-12-04 23:17                   ` Michael Snyder
2007-12-05 21:37                     ` Jim Blandy
2007-12-01  1:10 ` Russell Shaw
2007-12-01  1:46   ` Michael Snyder
2007-12-01  9:16     ` Eli Zaretskii
2007-12-04  2:04 ` Michael Snyder
2007-12-04  7:25   ` Vladimir Prus
2007-12-04 10:48     ` Michael Snyder [this message]
2007-12-04 14:07       ` Daniel Jacobowitz
2007-12-04 21:08     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196764468.2501.277.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb@sources.redhat.com \
    --cc=vladimir@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).