From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6021 invoked by alias); 26 Sep 2007 21:46:27 -0000 Received: (qmail 6012 invoked by uid 22791); 26 Sep 2007 21:46:26 -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; Wed, 26 Sep 2007 21:46:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B751D2AA5C5; Wed, 26 Sep 2007 17:46:21 -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 QEXFhP-cUd7s; Wed, 26 Sep 2007 17:46:21 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 79BAA2AA5C2; Wed, 26 Sep 2007 17:46:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4046CE7B58; Wed, 26 Sep 2007 14:46:19 -0700 (PDT) Date: Wed, 26 Sep 2007 21:51:00 -0000 From: Joel Brobecker To: Carlos Eduardo Seo Cc: Daniel Jacobowitz , gdb@sourceware.org Subject: Re: Problems while debugging fortran Message-ID: <20070926214619.GC9403@adacore.com> References: <46EB035B.4090802@linux.vnet.ibm.com> <20070920173246.GJ16400@adacore.com> <46F2CE45.5020308@linux.vnet.ibm.com> <20070920204622.GB4368@adacore.com> <20070920205629.GA17779@caradoc.them.org> <46FAD136.5030406@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46FAD136.5030406@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/msg00221.txt.bz2 > > Here's a relevant patch from the Debian packages of GDB. As you can > > see it comes from a mailing list message - I don't remember exactly > > who submitted it without looking it up and I don't remember exactly > > why it was never committed, but it was probably Wu Zhou and it was > > probably never merged because of the larger issue of symbol case > > sensitivity. > This patch works fine _if_ the compiler is gfortran/g77. However, not > all compilers call the program by "MAIN__". So, I was thinking about > having something in symtab.c:find_main_name that checks DW_CC_program > value if the language is Fortran and get the name from the main > routine from DW_AT_name. Is that an acceptable solution? Unfortunately, this is an idea that has already been discussed a couple of years ago, and people felt that this was not the intent of that attribute. See: http://www.cygwin.com/ml/gdb-patches/2005-11/msg00380.html I haven't followed any development on the DWARF3 side whether something more appropriate has been introduced for that purpose. What compiler are you using? Do you have any control on what your compiler does? Perhaps you can add an extra symbol like we do with the Ada compiler? Just some thoughts... -- Joel