This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Forbid watchpoint on a constant value
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Thu, 20 May 2010 20:22:29 -0300
- Subject: Re: [PATCH] Forbid watchpoint on a constant value
- References: <201005181418.24324.sergiodj@redhat.com> <20100520231308.GM3019@adacore.com>
On Thursday 20 May 2010 20:13:08, Joel Brobecker wrote:
> > Joel mentioned this patch yesterday, so here it is. This patch forbids
> > the user to create a watchpoint on a constant value. The idea is pretty
> > trivial:
> >
> > (gdb) watch 5
> > Cannot watch constant value 5.
>
> Without looking at the specifics of the patch for now, I am wondering
> what other people think of the idea itself. For myself, I can see how
> a warning might be useful, but forbidding it might be viewed as
> a little excessive, particularly if there is a bug in GDB (or in
> the debugging info!!!) that makes it think it's constant when in fact
> it's not.
Hi Joel,
Thanks for your review. I don't really have a strong opinion about it,
but your suggestion sounds pretty reasonable to me. Since Jan is the
co-author of this patch, I'll wait to see what he thinks about it.
Thanks,
--
Sergio Durigan Junior
Red Hat