* [PATCH] Fix check for resumed threads
@ 2001-07-13 5:53 Mark Kettenis
0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2001-07-13 5:53 UTC (permalink / raw)
To: gdb-patches; +Cc: ken
lin_lwp_wait() may be called when the list of LWPs is still empty
(this will add the LWP for which we receive an event to the list
automatically. This happens when debugging a statically linked
program.
Thanks to Ken Whaley for reporting this.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* lin-lwp.c (lin_lwp_wait): Avoid check for resumed LWPs if there
are no registered LWPs yet.
Index: lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.28
diff -u -p -r1.28 lin-lwp.c
--- lin-lwp.c 2001/07/12 19:37:36 1.28
+++ lin-lwp.c 2001/07/13 12:03:05
@@ -908,8 +908,9 @@ lin_lwp_wait (ptid_t ptid, struct target
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-07-13 5:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-13 5:53 [PATCH] Fix check for resumed threads Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox