From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28560 invoked by alias); 14 Dec 2007 18:49:11 -0000 Received: (qmail 28483 invoked by uid 22791); 14 Dec 2007 18:49:10 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Dec 2007 18:49:06 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id lBEIljjC011559; Fri, 14 Dec 2007 19:47:45 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id lBEIljv2008865; Fri, 14 Dec 2007 19:47:45 +0100 (CET) Date: Fri, 14 Dec 2007 19:07:00 -0000 Message-Id: <200712141847.lBEIljv2008865@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: vladimir@codesourcery.com CC: gdb-patches@sources.redhat.com In-reply-to: <200712142009.08263.vladimir@codesourcery.com> (message from Vladimir Prus on Fri, 14 Dec 2007 20:09:08 +0300) Subject: Re: [RFA] Inform about new thread in a single place. References: <200712142009.08263.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00191.txt.bz2 > From: Vladimir Prus > Date: Fri, 14 Dec 2007 20:09:08 +0300 > > We have lots of place where "[New thread XXX]" is printed. > This patch makes add_thread responsible for that. OK? No, there are places in the code where add_thread() is called where we should not print the "[New thread xxx]" message. For example in bsd-uthread.c, where the main thread is added to the list of threads to associate process ID and thread ID. > Inform about new thread in a single place. > * thread.c (add_thread): Announce new thread. > * inf-ttrace.c (inf_ttrace_wait): Don't > inform about new thread, as add_thread is always > called too, and will take care of that. > * infrun.c (handle_inferior_event): Likewise. > * procfs.c (procfs_wait): Likewise. > * remote.c (remote_currthread): Likewise. > * sol-thread.c (sol_thread_wait): Likewise. > * win32-nat.c (get_win32_debug_event): Likewise. > * gdb/linux-nat.c (lin_lwp_attach_lwp): Likewise. > * linux-thread-db.c (attach_thread): Don't inform > about new thread. This is called only from > linux-thread-db.c:attach_thread, which will take care.