From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11585 invoked by alias); 14 Dec 2007 19:07:31 -0000 Received: (qmail 11576 invoked by uid 22791); 14 Dec 2007 19:07:30 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Dec 2007 19:07:26 +0000 Received: (qmail 31025 invoked from network); 14 Dec 2007 19:07:24 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Dec 2007 19:07:24 -0000 From: Vladimir Prus To: Mark Kettenis Subject: Re: [RFA] Inform about new thread in a single place. Date: Fri, 14 Dec 2007 19:21:00 -0000 User-Agent: KMail/1.9.6 Cc: gdb-patches@sources.redhat.com References: <200712142009.08263.vladimir@codesourcery.com> <200712141847.lBEIljv2008865@brahms.sibelius.xs4all.nl> In-Reply-To: <200712141847.lBEIljv2008865@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712142207.19754.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/msg00192.txt.bz2 On Friday 14 December 2007 21:47:45 Mark Kettenis wrote: > > 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. Do you mean this code: /* HACK: Twiddle INFERIOR_PTID such that the initial thread of a process isn't recognized as a new thread. */ if (ptid_get_tid (ptid) != 0 && !in_thread_list (ptid) && ptid_get_tid (inferior_ptid) == 0) { add_thread (ptid); inferior_ptid = ptid; } ? I've just re-checked, and it appears that: 1. The modules that called add_thread without printing a message about new thread, prior to my patch are: - aix-thread.c - bsd-uthread.c - corelow.c - hpux-thread.c - nto-procfs.c Looking at those, it seems like the place you've pointed at is the only one where reporting of new thread is undesirable. What about me adding 'add_thread_silent' function that will not print any message, and using it in bds-uthread.c? - Volodya