This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Watchpoints in multithreaded programs
- From: Daniel Jacobowitz <drow at false dot org>
- To: Steve Freeland <caucasatron at yahoo dot ca>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 3 Oct 2006 00:07:20 -0400
- Subject: Re: Watchpoints in multithreaded programs
- References: <20061003035310.80501.qmail@web34211.mail.mud.yahoo.com>
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