From: PAUL GILLIAM <pgilliam@us.ibm.com>
To: gdb@sources.redhat.com
Subject: watchpoints and threads
Date: Thu, 27 Apr 2006 12:04:00 -0000 [thread overview]
Message-ID: <1146074582.18934.79.camel@dufur.beaverton.ibm.com> (raw)
The manual states:
_Warning:_ In multi-thread programs, watchpoints have only limited
usefulness. With the current watchpoint implementation, GDB can
only watch the value of an expression _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 watchpoints as
usual. However, GDB may not notice when a non-current thread's
activity changes the expression.
Yet the test testsuite/gdb.threads/watchthreads.exp contains the
following:
# Verify that we hit first watchpoint in child thread.
set message "watchpoint on args\[0\] hit in thread"
if { $args_1 > 1 } {
pass $message
} else {
fail $message
}
This seems like a conflict.
What brought this up is a user who wants this scenario to work:
* The target program has a global variable.
* GDB is started and a 'watch' command is give for that
variable.
* Some number of threads are started.
* If _any_ thread changes the value of the global variable,
_all_ threads stop.
The manual seems to say that this scenario will not work, but the
testcase seems to say that it will.
What's the story?
-=# Paul #=-
next reply other threads:[~2006-04-26 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-27 12:04 PAUL GILLIAM [this message]
2006-04-27 18:00 ` Daniel Jacobowitz
2006-05-22 15:39 ` Wu Zhou
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=1146074582.18934.79.camel@dufur.beaverton.ibm.com \
--to=pgilliam@us.ibm.com \
--cc=gdb@sources.redhat.com \
/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