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
On Thursday 04 March 2010 07:55:26, Eli Zaretskii wrote:
> > +static int
> > +is_watchpoint (struct breakpoint *bpt)
> > +{
> > + return (is_hardware_watchpoint (bpt)
> > + || bpt->type == bp_watchpoint);
> > +}
>
> Does this catch read and access watchpoints? Should it?
It does, and it should. I've added the below to the patch.
--
Pedro Alves
Index: src/gdb/breakpoint.c
===================================================================
--- src.orig/gdb/breakpoint.c 2010-03-04 16:03:30.000000000 +0000
+++ src/gdb/breakpoint.c 2010-03-04 16:03:09.000000000 +0000
@@ -921,6 +921,8 @@ insert_catchpoint (struct ui_out *uo, vo
b->ops->insert (b);
}
+/* Return true if BPT is of any hardware watchpoint kind. */
+
static int
is_hardware_watchpoint (struct breakpoint *bpt)
{
@@ -929,6 +931,9 @@ is_hardware_watchpoint (struct breakpoin
|| bpt->type == bp_access_watchpoint);
}
+/* Return true if BPT is of any watchpoint kind, hardware or
+ software. */
+
static int
is_watchpoint (struct breakpoint *bpt)
{