Watchpoints in multithreaded programs

Daniel Jacobowitz drow@false.org
Tue Oct 3 04:07:00 GMT 2006


On Mon, Oct 02, 2006 at 08:53:10PM -0700, Steve Freeland wrote:
> Is there anything particularly wrong with just setting the watchpoint
> individually in each of the threads?  I haven't a clue about
> portability, but on I've checked on i386 Linux and this seems to
> work... at least, it solves my problem.  I can clean this up and make
> it submittable as a patch, but first I'd like to know if there's a
> problem with it conceptually, as I've never worked with gdb internals
> before:

It's a little bit trickier than that, because you need to check all the
various status registers afterwards, IIRC.  But that's the basic idea
and the patches I referenced in the Red Hat SRPM add a generic way of
handling this.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list