This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mi] watchpoint-scope exec async command


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]