public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "pedro at codesourcery dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/8236] Watchpoints in multi-thread programs
Date: Tue, 17 Nov 2009 21:28:00 -0000	[thread overview]
Message-ID: <20091117212842.20445.qmail@sourceware.org> (raw)
In-Reply-To: <20030307184801.8236.ebs@ebshome.net>


------- Additional Comments From pedro at codesourcery dot com  2009-11-17 21:28 -------
GDB supports hardware watchpoints on multi-thread programs nowadays (with
a few gotchas).

The text in question seems to have been replaced in the manual.

 @cindex watchpoints and threads
 @cindex threads and watchpoints
 In multi-threaded programs, watchpoints will detect changes to the
 watched expression from every thread.

 @quotation
 @emph{Warning:} In multi-threaded programs, software watchpoints
 have only limited usefulness.  If @value{GDBN} creates a software
 watchpoint, it can only watch the value of an expression @emph{in a
 single thread}.  If you are confident that the expression can only
 change due to the current thread's activity (and if you are also
 confident that no other thread can become current), then you can use
 software watchpoints as usual.  However, @value{GDBN} may not notice
 when a non-current thread's activity changes the expression.  (Hardware
 watchpoints, in contrast, watch an expression in all threads.)
 @end quotation

The issue with software watchpoints is that with the
default scheduler locking of off, when gdb steps a thread for a
watchpoint, other threads run free for a bit.  This could be fixed by
stepping all threads simultaneously.  Needs target_resume interface
changes to make it work in all-stop.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=8236

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


           reply	other threads:[~2009-11-17 21:28 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20030307184801.8236.ebs@ebshome.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091117212842.20445.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).