From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27281 invoked by alias); 31 Jul 2003 20:37:38 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27273 invoked from network); 31 Jul 2003 20:37:38 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 31 Jul 2003 20:37:38 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.9/8.12.9) with ESMTP id h6VKbWbF012533; Thu, 31 Jul 2003 15:37:32 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h6VKbWHK026341; Thu, 31 Jul 2003 15:37:32 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h6VKbWve026340; Thu, 31 Jul 2003 16:37:32 -0400 Date: Thu, 31 Jul 2003 20:37:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200307312037.h6VKbWve026340@duracef.shout.net> To: carlton@kealia.com, hjl@lucon.org Subject: Re: gdb can't handle a DIE with both sibling and children Cc: gdb@sources.redhat.com X-SW-Source: 2003-07/txt/msg00385.txt.bz2 David Carlton asks: > So: what does it mean for a subroutine to have another entry point? I > see that that entry point has a name; is that name visible to other > compilation units, or only to the compilation unit in question? The former. The entry point is globally visible, just like the main function name. I never actually wrote an ENTRY statement, but here's a classic FORTRAN example, where the body of "sine" and "cosine" would be the same: double function sine (angle) double angle goto 10 entry cosine (angle) angle = (3.14159265358979/4) - angle goto 10 10 ... calculate the sine here ... return end Of course, one could have implemented this as: double entry cosine (angle) return sine (3.14159265358979/4 - angle) end But that's a waste of CPU time, back when the CPU was running at 0.1 MHz. For a modern example, it would be possible to implement those pesky in-charge/not-in-charge constructors with one body of code with 2 or 3 entry points. > If it's only visible to the compilation unit in question, then the > partial symtab probably doesn't have to know about it at all. If it's > visible outside the compilation unit (and if the compiler really is > correct in putting DW_TAG_entry_points as children of > DW_TAG_subroutines), then the partial symtab probably does have to know > about it. The main name and the entry names have the same visibility. To the caller, 'sine' and 'cosine' are peers. Michael C