This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [mi] watchpoint-scope exec async command
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: GDB <gdb at sources dot redhat dot com>
- Date: Fri, 01 Apr 2005 11:06:05 +0200
- Subject: Re: [mi] watchpoint-scope exec async command
- References: <20050328230048.GA1697@nevyn.them.org> <20050329014203.GB3801@white> <20050329013634.GB6373@nevyn.them.org> <20050329024945.GC3957@white> <20050329020123.GA7266@nevyn.them.org> <01c534a6$Blat.v2.4$944e44a0@zahav.net.il> <20050329214414.GA3498@nevyn.them.org> <01c53564$Blat.v2.4$1da3c140@zahav.net.il> <20050331014749.GA264@white> <01c535ab$Blat.v2.4$c21baac0@zahav.net.il> <20050331205826.GA1590@white>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 31 Mar 2005 15:58:26 -0500
> From: Bob Rossi <bob@brasko.net>
> Cc: GDB <gdb@sources.redhat.com>
>
> I do have another question though. If GDB has another mecanism to
> determine when hardware watchpoints go out of scope, why does it add the
> scope watchpoint at all?
I think that the scope breakpoint was introduced when software
watchpoints were coded. Software watchpoints do need the scope
breakpoint, and as you demonstrated, there's no problem in that case.
That is why I think we should simply not use the scope breakpoint for
hardware watchpoints.
> Is it added and then never used?
Well, your research shows that they _are_ used. We have two separate
mechanisms that serve the same purpose.
> or does it not serve a function at all in this case?
You mean, except for crashing GDB? ;-)
Anyway, note that the warning about the watchpoint going out of scope
comes from the code that independently detects this for hardware
watchpoints, with no help from the scope breakpoint. Which perhaps
means that we need to add a similar warning to the code that handles
the case that the scope breakpoint was hit, so that software
watchpoints will also produce such a warning.