From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31528 invoked by alias); 1 Oct 2007 17:49:58 -0000 Received: (qmail 31517 invoked by uid 22791); 1 Oct 2007 17:49:56 -0000 X-Spam-Check-By: sourceware.org Received: from igw2.br.ibm.com (HELO igw2.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 01 Oct 2007 17:49:53 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw2.br.ibm.com (Postfix) with ESMTP id 3C25217F4EC for ; Mon, 1 Oct 2007 14:47:21 -0300 (BRT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l91Hnoht2846814 for ; Mon, 1 Oct 2007 14:49:50 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l91HnmqY020758 for ; Mon, 1 Oct 2007 14:49:49 -0300 Received: from [9.18.238.59] (dyn531792.br.ibm.com [9.18.238.59]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l91HnlxM020746; Mon, 1 Oct 2007 14:49:48 -0300 Message-ID: <4701333C.9040705@linux.vnet.ibm.com> Date: Mon, 01 Oct 2007 17:49:00 -0000 From: Carlos Eduardo Seo User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: Jim Blandy CC: gdb@sourceware.org, drow@false.org Subject: Re: DWARF question References: <46FAC9D7.9080001@linux.vnet.ibm.com> <20070926212539.GA17502@caradoc.them.org> <46FAD46B.9000006@br.ibm.com> <46FD5A9B.2070004@linux.vnet.ibm.com> <46FD7AE9.8030208@linux.vnet.ibm.com> In-Reply-To: OpenPGP: id=8BFFA900 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00007.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jim Blandy wrote: > > What probably happens is that '-readnow' somehow affects the order in > which the full symtabs get put in the list. I'm surprised that > breakpoints by line number in both main and the function work, but I > guess that has something to do with the nature of the bug in > find_line_symtab. Here's what I got. The loop 'ALL_SYMTABS' has only one iteration because 's->next' is NULL. So it seems that GDB isn't loading the other symtab. When I use '-readnow', both symtabs are there: (top-gdb) p s->filename $6 = 0x106a4930 "init.c" (top-gdb) p (s->next)->filename $7 = 0x1069cf10 "/usr/src/packages/BUILD/glibc-2.4/cc-nptl/csu/crti.S" (top-gdb) p ((s->next)->next)->filename $8 = 0x1069cc60 "test-main.f" (top-gdb) p (((s->next)->next)->next)->filename $9 = 0x1069c280 "test-main.f" (top-gdb) p ((((s->next)->next)->next)->next)->filename $10 = 0x1068d5c0 "crtsavres.S" (top-gdb) p (((((s->next)->next)->next)->next)->next)->filename $11 = 0x1068d2a0 "/usr/src/packages/BUILD/glibc-2.4/cc-nptl/csu/crtn.S" (top-gdb) p (((((s->next)->next)->next)->next)->next)->next $17 = (struct symtab *) 0x0 And the loop 'ALL_SYMTABS' work. So, it looks like the bug isn't in this function. I'm going to look at where GDB populates the symtabs list now. Any thoughts? Regards, - -- Carlos Eduardo Seo Software Engineer IBM Linux Technology Center -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHATM8qvq7Aov/qQARAjvjAJ9gkyzimsdqWIcfomV92r2epC14RgCeIij7 aImDP4A6XiUgmIRbEnRhe+Q= =dpf+ -----END PGP SIGNATURE-----