This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Somewhat sanitize watchpoints with conditions on local expressions
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: pedro at codesourcery dot com, gdb-patches at sourceware dot org
- Date: Thu, 04 Mar 2010 02:57:18 -0500
- Subject: Re: Somewhat sanitize watchpoints with conditions on local expressions
- References: <201003040350.34417.pedro@codesourcery.com> <20100304055926.GI2832@adacore.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 4 Mar 2010 09:59:26 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> > IMO, GBB could be smarted, and check if it makes sense
> > to evaluate the condition in the current frame before
> > actualy trying, and stop if it doesn't, with an short blurb:
> >
> > (gdb) c
> > Continuing.
> > warning: Watchpoint condition can't tested in the current scope
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> That, or maybe just disable the watchpoint and keep going?
Personally, I hate it when GDB disables watchpoints automatically,
since more often than not, it does the Wrong Thing.