From: Mark Kettenis <kettenis@wins.uva.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] thread-db.c fix
Date: Fri, 30 Mar 2001 11:38:00 -0000 [thread overview]
Message-ID: <200103301938.f2UJcHl03879@delius.kettenis.local> (raw)
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:
reply other threads:[~2001-03-30 11:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200103301938.f2UJcHl03879@delius.kettenis.local \
--to=kettenis@wins.uva.nl \
--cc=gdb-patches@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