Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Warn on constant value watchpoints
Date: Sun, 08 Jun 2008 18:05:00 -0000	[thread overview]
Message-ID: <uskvnls5g.fsf@gnu.org> (raw)
In-Reply-To: <20080608155302.GA25486@host0.dyn.jankratochvil.net>

> Date: Sun, 8 Jun 2008 17:53:02 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> 
> --tKW2IUtsqtDRztdT
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> Hi,
> 
> idea came from a discussion with the Firefox maintainer Martin Stransky who had
> disfunctional watchpoint on the address of a variable:
> 
> (gdb) watch 0x4343548
> Watchpoint 1: 70530376

Should we allow such watchpoints? under what circumstances are they
useful?

> +      if (v == NULL && !query
> +		(_("Do you insist on this watchpoint with a constant value? ")))

I think a better text for this question would be

  Really watch constant value %s?

> +If you watch for a change in a numerically entered address you need to
> +dereference it as the address itself is just a constant number which will never
> +change:
> +
> +@smallexample
> +(@value{GDBP}) watch 0x600850
> +Do you insist on this watchpoint with a constant value? (y or n) n
> +Watchpoint with a constant value was cancelled.
> +(@value{GDBP}) watch *(int *) 0x600850
> +Watchpoint 1: *(int *) 6293584
> +@end smallexample

Thanks, but please mention in the text that GDB asks for confirmation
because watching a constant value is not generally useful.  Otherwise,
the example might not be fully understood.

Other than that, the patch for the manual is approved (assuming the
code is approved).


  reply	other threads:[~2008-06-08 18:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 15:53 Jan Kratochvil
2008-06-08 18:05 ` Eli Zaretskii [this message]
2008-06-08 18:09   ` Daniel Jacobowitz
2008-06-08 18:50     ` Eli Zaretskii
2008-06-08 19:28       ` Jan Kratochvil
2008-06-09  6:14         ` Jan Kratochvil
2008-06-26 15:01           ` Daniel Jacobowitz
2008-06-26 19:40             ` Eli Zaretskii
2008-07-10  9:00             ` Jan Kratochvil
2008-07-10  9:02             ` Jan Kratochvil
2008-07-10  9:06               ` Jan Kratochvil

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=uskvnls5g.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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