This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: breakpoints/1692: [regression] watchpoints broken on native hppa2.0w-hp-hpux11.11
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 25 Jun 2004 04:08:02 -0000
- Subject: Re: breakpoints/1692: [regression] watchpoints broken on native hppa2.0w-hp-hpux11.11
- Reply-to: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
The following reply was made to PR breakpoints/1692; it has been noted by GNATS.
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: breakpoints/1692: [regression] watchpoints broken on native hppa2.0w-hp-hpux11.11
Date: Thu, 24 Jun 2004 23:58:02 -0400 (EDT)
I narrowed the responsible patch down to this:
2004-04-26 Orjan Friberg <orjanf@axis.com>
* frame.c: Include "observer.h".
(frame_observer_target_changed): New function.
(_initialize_frame): Attach target_changed observer.
* regcache.c: Include "observer.h".
(regcache_observer_target_changed): New function.
(_initialize_regcache): Attach target_changed observer.
* valops.c: Include "observer.h".
(value_assign): Notify target_changed event when modifying register.
* Makefile.in (frame.o, regcache.o, valops.o): Add $(observer_h).
Looking at the mailing lists, there's already been some fallout
from this patch. Ulrich Weigand did a followup patch to fix problems
with watchpoints on s390.
I breakpointed the current version of gdb in bp_stop_status here:
/* Hardware watchpoints are treated as non-existent if the reason we
stopped wasn't a hardware watchpoint (we didn't stop on some data
address). Otherwise gdb won't stop on a break instruction in the code
(not from a breakpoint) when a hardware watchpoint has been defined. */
if (b->type != bp_watchpoint
&& !((b->type == bp_hardware_watchpoint
|| b->type == bp_read_watchpoint
|| b->type == bp_access_watchpoint)
&& stopped_by_watchpoint)
&& b->type != bp_hardware_breakpoint
&& b->type != bp_catch_fork
&& b->type != bp_catch_vfork
&& b->type != bp_catch_exec
&& b->type != bp_catch_catch
&& b->type != bp_catch_throw) /* a non-watchpoint bp */
and I see b->type == bp_hardware_watchpoint, stopped_by_watchpoint == 0.
This bug might affect other targets as well. It's definitely
killing watchpoints on native hppa2.0w-hp-hpux11.11.
I don't know how to fix this; we need a watchpoint expert
like Orjan or Eli.
Michael C