* [PATCH] thread-db.c fix
@ 2001-03-30 11:38 Mark Kettenis
0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2001-03-30 11:38 UTC (permalink / raw)
To: gdb-patches
The attached patch fixes a problem in thread-db.c:check_event(). See
comment for an explanation of the problem.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* thread-db.c (check_event): Don't report an error if we encounter
a thread creation event for a thread that's already in the thread
list, since that may legitemately happen. Instead only call
attach_thread if it's not already in the thread list.
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.5
diff -u -p -r1.5 thread-db.c
--- thread-db.c 2001/03/01 01:39:21 1.5
+++ thread-db.c 2001/03/30 19:35:18
@@ -697,10 +697,11 @@ check_event (int pid)
error ("Thread creation event doesn't match breakpoint.");
#endif
- if (in_thread_list (pid))
- error ("Spurious thread creation event.");
-
- attach_thread (pid, msg.th_p, &ti, 1);
+ /* We may already know about this thread, for instance when the
+ user has issued the `info threads' command before the SIGTRAP
+ for hitting the thread creation breakpoint was reported. */
+ if (! in_thread_list (pid))
+ attach_thread (pid, msg.th_p, &ti, 1);
return;
case TD_DEATH:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-30 11:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-30 11:38 [PATCH] thread-db.c fix Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox