From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15624 invoked by alias); 14 Dec 2007 19:21:57 -0000 Received: (qmail 15615 invoked by uid 22791); 14 Dec 2007 19:21:56 -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 19:21:52 +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 lBEJKVZB002518; Fri, 14 Dec 2007 20:20:31 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id lBEJKVI1027649; Fri, 14 Dec 2007 20:20:31 +0100 (CET) Date: Fri, 14 Dec 2007 19:42:00 -0000 Message-Id: <200712141920.lBEJKVI1027649@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: vladimir@codesourcery.com CC: gdb-patches@sources.redhat.com In-reply-to: <200712142207.19754.vladimir@codesourcery.com> (message from Vladimir Prus on Fri, 14 Dec 2007 22:07:19 +0300) Subject: Re: [RFA] Inform about new thread in a single place. References: <200712142009.08263.vladimir@codesourcery.com> <200712141847.lBEIljv2008865@brahms.sibelius.xs4all.nl> <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/msg00193.txt.bz2 > From: Vladimir Prus > Date: Fri, 14 Dec 2007 22:07:19 +0300 > > 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: Yes. > 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? That'd be acceptable to me. I'm not absolutely true that none of the modules you mention above don't need this, but we can fix those when we notice the problem. Mark