From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22957 invoked by alias); 31 Jul 2002 16:39:11 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22949 invoked from network); 31 Jul 2002 16:39:10 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 31 Jul 2002 16:39:10 -0000 Received: from dsl254-114-118.nyc1.dsl.speakeasy.net ([216.254.114.118] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17ZwVE-0007y6-00; Wed, 31 Jul 2002 11:39:12 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17ZwVC-0001T9-00; Wed, 31 Jul 2002 12:39:10 -0400 Date: Wed, 31 Jul 2002 09:55:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, jimb@redhat.com Subject: RFA: gdb/568, messy thread exits Message-ID: <20020731163910.GA5622@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, jimb@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00615.txt.bz2 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 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));