From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17519 invoked by alias); 28 Sep 2007 19:48:52 -0000 Received: (qmail 17511 invoked by uid 22791); 28 Sep 2007 19:48:51 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Sep 2007 19:48:48 +0000 Received: from mailhub3.br.ibm.com (mailhub3 [9.18.232.110]) by igw1.br.ibm.com (Postfix) with ESMTP id 6F92132C1E5 for ; Fri, 28 Sep 2007 16:30:33 -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 l8SJmhbX3006538 for ; Fri, 28 Sep 2007 16:48:44 -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 l8SJmgp5023988 for ; Fri, 28 Sep 2007 16:48:43 -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 l8SJmgJ4023968; Fri, 28 Sep 2007 16:48:42 -0300 Message-ID: <46FD5A9B.2070004@linux.vnet.ibm.com> Date: Fri, 28 Sep 2007 20:26:00 -0000 From: Carlos Eduardo Seo User-Agent: Thunderbird 2.0.0.6 (X11/20070907) MIME-Version: 1.0 To: gdb@sourceware.org CC: drow@false.org Subject: Re: DWARF question References: <46FAC9D7.9080001@linux.vnet.ibm.com> <20070926212539.GA17502@caradoc.them.org> <46FAD46B.9000006@br.ibm.com> In-Reply-To: <46FAD46B.9000006@br.ibm.com> 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-09/txt/msg00251.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Carlos Eduardo Seo wrote: > It's generating one compilation unit for the "main" program and another > one for a function called by that program. Both are implemented in the > same source file. > > And the source is in Fortran. This another problem that happens in the situation I described in this thread: http://sourceware.org/ml/gdb/2007-09/msg00134.html aside from that finding "main" problem. The problem is that, when I try to set a breakpoint by line number in this case, two things may happen: 1. if I set the breakpoint somewhere inside "main", it works. 2. if I set the breakpoint somewhere inside the function, it doesn't work (i.e. 'No line xx in file "foo.f".'). In other words, it seems that GDB doesn't have the line number information for that function. In order to fix this, I can think about two approaches: - - Make GDB read the two existing symtabs for that source file when the binary is loaded; or - - When a breakpoint by line number is called, GDB tries to look for that line in the other symtabs corresponding to the current objfile. What do you think? 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 iD8DBQFG/Vqbqvq7Aov/qQARAorRAJ9wLu3GrdBQr2W1jE+X/mDnmHV4nQCfZmWX 5FYKUlqCGlx0e6ZSFpK+qHQ= =y1w8 -----END PGP SIGNATURE-----