From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4625 invoked by alias); 23 Sep 2007 02:52:03 -0000 Received: (qmail 4616 invoked by uid 22791); 23 Sep 2007 02:52:03 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 23 Sep 2007 02:52:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B47CF2A9D66; Sat, 22 Sep 2007 22:50:36 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id IZMvMl6wdL+7; Sat, 22 Sep 2007 22:50:36 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7A6EB2A9D8A; Sat, 22 Sep 2007 22:50:36 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0C080E7B58; Sat, 22 Sep 2007 19:50:34 -0700 (PDT) Date: Mon, 24 Sep 2007 10:01:00 -0000 From: Joel Brobecker To: Carlos Eduardo Seo Cc: gdb@sourceware.org Subject: Re: Problems while debugging fortran Message-ID: <20070923025033.GA20073@adacore.com> References: <46EB035B.4090802@linux.vnet.ibm.com> <20070920173246.GJ16400@adacore.com> <46F2CE45.5020308@linux.vnet.ibm.com> <20070920204622.GB4368@adacore.com> <46F5D13D.2070303@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46F5D13D.2070303@linux.vnet.ibm.com> User-Agent: Mutt/1.4.2.2i 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/msg00183.txt.bz2 > As you can see, breakpoints by line number don't work. However, if I > use the function name, it works correctly. I think Daniel was right on the spot. You are trying to use the "current source file" concept right at the start of your session assuming that it is automatically set to the source file where you main is defined. Is that correct? Unfortunately, I think this feature only works well for Ada and C as far as I can tell from the code. Does the patch that Daniel posted earlier help in your case? We can certainly work on modifying GDB to be better at finding the name of the main procedure in a Fortran program (just like we do with Ada programs). In the meantime, you'll have to force the current source file name to be your test.f by doing a "list" of that file first. -- Joel