[RFA]: Modified Watchthreads Patch

Daniel Jacobowitz drow@false.org
Sat Dec 11 18:50:00 GMT 2004


On Sat, Dec 11, 2004 at 08:05:30PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 11 Dec 2004 12:37:57 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: kettenis@gnu.org, jjohnstn@redhat.com, gdb-patches@sources.redhat.com
> > 
> > For the Linux kernel, it doesn't matter what you set in that bit.  It
> > has to clear the registers at task switch anyway, for security reasons.
> 
> This might mean that, in practice, we will need to have some GDB code
> to produce an illusion of thread-specific watchpoints on the x86.
> That is, the hardware will stop the inferior whenever _any_ thread
> hits the watchtpoint, and then GDB will take control, and figure out
> whether it needs to stop or continue.

Actually, I believe it means the opposite.  This is why the registers
are supposed to be specific to individual tasks.  Remember that in
Linux, a task is an LWP, not a "process" - a somewhat mythical beast
under Linux.  The hardware will stop the particular task that hits the
watchpoint; it's GDB that has to stop the other LWPs.

-- 
Daniel Jacobowitz



More information about the Gdb-patches mailing list