From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13954 invoked by alias); 29 Jun 2009 18:13:21 -0000 Received: (qmail 13908 invoked by uid 22791); 29 Jun 2009 18:13:20 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Jun 2009 18:13:14 +0000 Received: (qmail 12102 invoked from network); 29 Jun 2009 18:13:12 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Jun 2009 18:13:12 -0000 From: Pedro Alves To: Michael Snyder Subject: Re: About handle_inferior_event new_thread_event Date: Mon, 29 Jun 2009 18:13:00 -0000 User-Agent: KMail/1.9.10 Cc: "gdb@sourceware.org" References: <200906291229.12382.pedro@codesourcery.com> <4A49020A.9010009@vmware.com> In-Reply-To: <4A49020A.9010009@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906291914.17400.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00308.txt.bz2 On Monday 29 June 2009 19:03:54, Michael Snyder wrote: > There's been a lot of evolution as far as thread list > accounting since that code was put in place. =A0In the > very early days, this was the only way we had of discovering > threads. =A0If a thread didn't get a stop event, gdb would > not know that thread existed. That's understandable, and still true on many targets (remote.c included, but new threads found discovered by stop events are handled by remote.c:remote_wait itself), but, you don't need to resume the target immediately for that. You just need to add the thread to the list, and continue handling the event. It's the resume-once bit that I find surprising, and which makes me believe that someone was using this in place of a ficticious TARGET_WAITKIND_NEW_THREAD_EVENT (add new thread to list, otherwise treat as TARGET_WAIKIND_SPURIOUS). --=20 Pedro Alves