From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7850 invoked by alias); 7 Oct 2008 15:19:38 -0000 Received: (qmail 7842 invoked by uid 22791); 7 Oct 2008 15:19:37 -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; Tue, 07 Oct 2008 15:19:02 +0000 Received: (qmail 10553 invoked from network); 7 Oct 2008 15:19:00 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Oct 2008 15:19:00 -0000 From: Pedro Alves To: Joel Brobecker Subject: Re: [RFA/commit] Add support for DEC threads on alpha-osf Date: Tue, 07 Oct 2008 15:19:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sourceware.org References: <20081007130322.GD28143@adacore.com> <200810071508.32985.pedro@codesourcery.com> <20081007150154.GI28138@adacore.com> In-Reply-To: <20081007150154.GI28138@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810071619.36274.pedro@codesourcery.com> X-IsSubscribed: yes 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-10/txt/msg00210.txt.bz2 On Tuesday 07 October 2008 16:01:54, Joel Brobecker wrote: > Thanks for the quick feedback! > > > Hmmm, procfs.c. It looks weird that LWP 3 and the main process are > > the same thing. If they are the same, and I haven't messed something up, > > you should only see one of them. IIRC, I don't get that on solaris. > > How does it work (to determine whether the process and the LWP are > the same)? I could probably take a look. Not sure whether I could > help much, though. Maybe here: procfs_init_inferior: ... /* We now have have access to the lwpid of the main thread/lwp. */ lwpid = proc_get_current_thread (pi); /* Create a procinfo for the main lwp. */ create_procinfo (pid, lwpid); /* We already have a main thread registered in the thread table at this point, but it didn't have any lwp info yet. Notify the core about it. This changes inferior_ptid as well. */ thread_change_ptid (pid_to_ptid (pid), MERGEPID (pid, lwpid)); ... maybe proc_get_current_thread returns 0, and then later on in procfs_wait we're adding the main thread again, but then with an lwp id already. But what sounded very strange is that the LWP is number 3, not 1. > I don't mind having a quick > look if it's not too time-consuming. What do you think? It's certainly fine the way it is to me, just an annoyance. I'm happy to find out that we don't crash in this situation, so thanks for that. :-) -- Pedro Alves