public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/8236] Watchpoints in multi-thread programs
       [not found] <20030307184801.8236.ebs@ebshome.net>
@ 2009-11-17 21:28 ` pedro at codesourcery dot com
  0 siblings, 0 replies; only message in thread
From: pedro at codesourcery dot com @ 2009-11-17 21:28 UTC (permalink / raw)
  To: gdb-prs


------- 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-17 21:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030307184801.8236.ebs@ebshome.net>
2009-11-17 21:28 ` [Bug breakpoints/8236] Watchpoints in multi-thread programs pedro at codesourcery dot com

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).