This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] Unified watchpoints for x86 platforms
> From: Mark Kettenis <email@example.com>
> Date: 27 Feb 2001 12:28:43 +0100
> > For those who might not remember what those flags are: Each
> > hardware-assisted breakpoint or watchpoint should be enabled by
> > setting bits in the DR7 register. A watchpoint can be enabled locally
> > or globally, depending on which bit in DR7 is set for that watchpoint.
> > A watchpoint that is enabled locally will only break if it is hit in
> > the current task. A watchpoint that is enabled globally will break in
> > any task.
> Makes me wonder if global watchpoints would really work if hardware
> task switching isn't used.
I guess the answer depends on how exactly is the software task
switching implemented. Namely, does it reset the GE and LE bits in
DR7 when the task switch happens.
> In principle a GDB command to control whether to enable watchpoints
> locally or globally wouldn't be a bad idea. But I don't know any
> targets where this would be useful. So if it isn't useful for DJGPP
> either, I wouldn't bother. A comment about the issue at the right
> spot would be nice though.
That was my tendency as well. Thanks for the feedback.