aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-07-27 21:05:37 +0000
committerDaniel Jacobowitz <drow@false.org>2008-07-27 21:05:37 +0000
commite09490f18a66aa4d02a2f5b7a75d2530caf09d5b (patch)
treee2e584bfa3cbc4f22445c6621d8244d3e26c6efa /gdb/linux-nat.c
parent6387b45f80c8d6f9392b37bf15a316bd43c8d58b (diff)
downloadgdb-e09490f18a66aa4d02a2f5b7a75d2530caf09d5b.zip
gdb-e09490f18a66aa4d02a2f5b7a75d2530caf09d5b.tar.gz
gdb-e09490f18a66aa4d02a2f5b7a75d2530caf09d5b.tar.bz2
* linux-nat.c (count_events_callback, select_event_lwp_callback): Only
report events from resumed threads. * gdb.threads/schedlock.exp (get_args): Update to work for any value of NUM. (Top level): Report the number of threads that did not resume.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r--gdb/linux-nat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 967beb4..5ccff50 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -2319,8 +2319,8 @@ count_events_callback (struct lwp_info *lp, void *data)
gdb_assert (count != NULL);
- /* Count only LWPs that have a SIGTRAP event pending. */
- if (lp->status != 0
+ /* Count only resumed LWPs that have a SIGTRAP event pending. */
+ if (lp->status != 0 && lp->resumed
&& WIFSTOPPED (lp->status) && WSTOPSIG (lp->status) == SIGTRAP)
(*count)++;
@@ -2347,8 +2347,8 @@ select_event_lwp_callback (struct lwp_info *lp, void *data)
gdb_assert (selector != NULL);
- /* Select only LWPs that have a SIGTRAP event pending. */
- if (lp->status != 0
+ /* Select only resumed LWPs that have a SIGTRAP event pending. */
+ if (lp->status != 0 && lp->resumed
&& WIFSTOPPED (lp->status) && WSTOPSIG (lp->status) == SIGTRAP)
if ((*selector)-- == 0)
return 1;