From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19025 invoked by alias); 25 Oct 2007 19:10:29 -0000 Received: (qmail 19013 invoked by uid 22791); 25 Oct 2007 19:10:28 -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; Thu, 25 Oct 2007 19:10:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 391DD2AABF1; Thu, 25 Oct 2007 15:10:11 -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 9Fa9OT3gkcae; Thu, 25 Oct 2007 15:10:11 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id F06F12AABEB; Thu, 25 Oct 2007 15:10:10 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C773CE7AC8; Thu, 25 Oct 2007 12:10:08 -0700 (PDT) Date: Thu, 25 Oct 2007 19:23:00 -0000 From: Joel Brobecker To: Jim Blandy Cc: Carlos Eduardo Seo , gdb-patches@sourceware.org Subject: Re: Problems while debugging fortran Message-ID: <20071025191008.GB4157@adacore.com> References: <20071024195719.GA16009@caradoc.them.org> <471FA810.6080506@linux.vnet.ibm.com> <471FBF9E.5000607@linux.vnet.ibm.com> <20071024220648.GL11797@adacore.com> <472098B2.5010605@linux.vnet.ibm.com> <20071025154107.GA13835@caradoc.them.org> <20071025170453.GA26928@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00669.txt.bz2 > The committee wanted language that would be clear in all sorts of > hairy corner cases: What about Java, where the entry point isn't > selected until link time? What about Ada, where every module can have > its own main, and they all get run in some order? What about global > constructors in C++ --- they're the first user code that gets > executed? What about COBOL, where I fell asleep? Yeah, the case of Ada is a bit particular, because the entry point and the main procedures are completely distinct. There is no way that the *compiler* knows whether one procedure is going to be the "main" or not for a given program. In fact, the same unit, compiled once, can be used as the main in one program, and as a simple procedure that you call in another program. Because of that, I'm not sure that a DWARF-based solution to encoding the name of the main procedure is practical. -- Joel