This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: gdb/568, messy thread exits
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com, jimb at redhat dot com
- Date: Wed, 31 Jul 2002 12:39:10 -0400
- Subject: RFA: gdb/568, messy thread exits
Jim, what do you think about this change? This fixes a whole class of
problems for me, by not longjmp'ing out of attempts to kill/detach/quit/etc.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-07-31 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/568
* thread-db.c (lwp_from_thread): Only warn if unable to find
the thread.
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.22
diff -u -p -r1.22 thread-db.c
--- thread-db.c 23 Mar 2002 17:38:13 -0000 1.22
+++ thread-db.c 31 Jul 2002 16:29:52 -0000
@@ -260,6 +260,12 @@ lwp_from_thread (ptid_t ptid)
return ptid;
err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
+ if (err == TD_ERR)
+ {
+ warning ("Cannot find thread %ld: %s",
+ (long) GET_THREAD (ptid), thread_db_err_str (err));
+ return ptid;
+ }
if (err != TD_OK)
error ("Cannot find thread %ld: %s",
(long) GET_THREAD (ptid), thread_db_err_str (err));