From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29789 invoked by alias); 6 Aug 2004 19:18:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29782 invoked from network); 6 Aug 2004 19:18:45 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 6 Aug 2004 19:18:45 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i76JIde3025975 for ; Fri, 6 Aug 2004 15:18:40 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i76JITa19642; Fri, 6 Aug 2004 15:18:29 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6AF8B2B9D; Fri, 6 Aug 2004 15:18:24 -0400 (EDT) Message-ID: <4113D980.7040102@gnu.org> Date: Fri, 06 Aug 2004 19:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: Joel Brobecker Cc: "Nathan J. Williams" , gdb-patches@sources.redhat.com Subject: Re: thread ptids when debugging from core file (x86-linux) References: <20040806040959.GL1192@gnat.com> <41131998.2030003@gnu.org> <20040806175818.GR1192@gnat.com> In-Reply-To: <20040806175818.GR1192@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00167.txt.bz2 >>Joel, this observation of yours is the key: >>> >> >>>> >Unfortunately, that doesn't work when debugging from a core file, >>>> >because the PTID of the threads are not the same as when debugging >>>> >live. >> >>> >>> The best way to appreciate this is to consider: >>> >>> (gdb) attach program >>> (gdb) info threads >>> thread output #1 >>> (gdb) info lwp -- yes ok, that cmd doesn't exist :-) >>> lwp output #1 (different to the thread output) >>> (gdb) gcore program.gcore >>> (gdb) detach >>> Segmentation fault core dumped to program.core >>> (gdb) corefile program.core >>> (gdb) info threads >>> identical thread output #2 >>> (gdb) info lwp >>> identical lwp output #2 >>> (gdb) corefile program.gcore >>> (gdb) info threads >>> also identical output #3 >>> (gdb) info lwp >>> also identical lwp output #3 > > > I am sorry, I don't understand what you are saying. What do you > mean by "identical output #n"? What is it identical to? to output > #1? (right now, it is not). Yes. ``thread output'' #1, #2, an #3 should be identical. Similarly ``lwp output'' 1-3 should also be identical. The're not, its a bug (and one everyone has been trying to sweep under the carpet). The corefile code should be loading libthread_db so that GDB can use the .reg/ along with memory information to re-create the thread list. At one stage it even did that but it was then disabled because it caused a core dump and ... Andrew