From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16516 invoked by alias); 26 Apr 2008 16:05:39 -0000 Received: (qmail 16503 invoked by uid 22791); 26 Apr 2008 16:05:39 -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; Sat, 26 Apr 2008 16:05:21 +0000 Received: (qmail 5480 invoked from network); 26 Apr 2008 16:05:19 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Apr 2008 16:05:19 -0000 From: Vladimir Prus Date: Sat, 26 Apr 2008 16:44:00 -0000 Subject: [RFA] Report the main thread. To: gdb-patches@sources.redhat.com X-TUID: 989d38cf95845246 X-Length: 905 X-UID: 165 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804262005.18646.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: 2008-04/txt/msg00596.txt.bz2 Presently, on Linux, we do add the main thread to the thread list, but we fail to report this new thread to outside world. I think we should not do any such special-casing -- if we want the =thread-created notification to be usable as replacement for getting the thread, we better emit that for all new thread. This patch changes the behaviour. OK? - Volodya * linux-nat.c (linux_nat_wait): Use add_thread, not add_thread_silent, when adding main thread. --- gdb/linux-nat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index cac4bb7..9471cd8 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -2453,7 +2453,7 @@ linux_nat_wait (ptid_t ptid, struct target_waitstatus *ourstatus) lp = add_lwp (inferior_ptid); lp->resumed = 1; /* Add the main thread to GDB's thread list. */ - add_thread_silent (lp->ptid); + add_thread (lp->ptid); set_running (lp->ptid, 1); } -- 1.5.3.5