From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18349 invoked by alias); 28 Sep 2007 23:14:05 -0000 Received: (qmail 18340 invoked by uid 22791); 28 Sep 2007 23:14:05 -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; Fri, 28 Sep 2007 23:14:03 +0000 Received: (qmail 27269 invoked from network); 28 Sep 2007 23:14:01 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Sep 2007 23:14:01 -0000 To: Carlos Eduardo Seo 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> From: Jim Blandy Date: Fri, 28 Sep 2007 23:49:00 -0000 In-Reply-To: <46FD7AE9.8030208@linux.vnet.ibm.com> (Carlos Eduardo Seo's message of "Fri, 28 Sep 2007 19:06:33 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-09/txt/msg00257.txt.bz2 Carlos Eduardo Seo writes: > Jim Blandy wrote: >> The real question here is, why isn't find_line_symtab doing its job? >> Its comment says: >> >> /* Find line number LINE in any symtab whose name is the same as >> SYMTAB. >> >> If found, return the symtab that contains the linetable in which > it was >> found, set *INDEX to the index in the linetable of the best entry >> found, and set *EXACT_MATCH nonzero if the value returned is an >> exact match. >> >> If not found, return NULL. */ >> >> That sounds to me like it's meant to address exactly the case we have >> here. Could you take a look and tell us what you find? >> > Good point Jim. I'll take a look at that. The only thing I noticed in > that function is that best_index always returns -1 when I try to set a > breakpoint by line number in that function. I'm going deeper into that > now. > > One point I forgot to mention and I think it's relevant is that when I > load the binary with option '-readnow', that breakpoint by line number > in the function works. 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.