diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-07-13 12:49:31 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-07-13 12:49:31 +0000 |
commit | 9a973a8fb2eaf9e74bd3e49835b43baf357a544b (patch) | |
tree | 9cbb0cfd1b9e6a8f0f305c96960da52b69b00d9d | |
parent | 95500e1ca45a2d6bdd31f084a1946c4f777fa89a (diff) | |
download | gdb-9a973a8fb2eaf9e74bd3e49835b43baf357a544b.zip gdb-9a973a8fb2eaf9e74bd3e49835b43baf357a544b.tar.gz gdb-9a973a8fb2eaf9e74bd3e49835b43baf357a544b.tar.bz2 |
* lin-lwp.c (lin_lwp_wait): Avoid check for resumed LWPs if there
are no registered LWPs yet.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/lin-lwp.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ba3ff55..8542a8e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-07-13 Mark Kettenis <kettenis@gnu.org> + + * lin-lwp.c (lin_lwp_wait): Avoid check for resumed LWPs if there + are no registered LWPs yet. + 2001-07-12 Daniel Jacobowitz <drow@mvista.com> * config/i386/nm-linux.h (CANNOT_FETCH_REGISTER): Call the right diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c index 61228a0..385b235 100644 --- a/gdb/lin-lwp.c +++ b/gdb/lin-lwp.c @@ -908,8 +908,9 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus) retry: - /* Make sure there is at least one thread that has been resumed. */ - gdb_assert (iterate_over_lwps (resumed_callback, NULL)); + /* Make sure there is at least one LWP that has been resumed, at + least if there are any LWPs at all. */ + gdb_assert (num_lwps == 0 || iterate_over_lwps (resumed_callback, NULL)); /* First check if there is a LWP with a wait status pending. */ if (pid == -1) |