From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2973 invoked by alias); 20 Nov 2002 01:58:44 -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 2924 invoked from network); 20 Nov 2002 01:58:43 -0000 Received: from unknown (HELO fenway.scenix.com) (4.20.168.10) by sources.redhat.com with SMTP; 20 Nov 2002 01:58:43 -0000 Received: from nkelseyxp (NKELSEY-XP [192.168.1.246]) by fenway.scenix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2656.59) id W8S7XM8J; Tue, 19 Nov 2002 17:58:07 -0800 Message-ID: <049f01c29038$5a4cdbf0$f601a8c0@nkelseyxp> Reply-To: "Nick Kelsey" From: "Nick Kelsey" To: Subject: getting lookup_symbol to find aliases Date: Tue, 19 Nov 2002 17:58:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-11/txt/msg00239.txt.bz2 Hi all, I am working on the ip2k gdb port (should be released before the end of the year) and I have come across a problem.... When printing the stack call chain gdb normally stops at main() (which is desirable). The main symbol is looked up in blockframe.c: mainsym = lookup_symbol (main_name (), NULL, VAR_NAMESPACE, NULL, NULL); This works fine when main is a real function but it fails when main is an alias (returns NULL). Upon further investigation, lookup symbol doesn't seam to understand aliases which explains quite a few problems as we tend to use aliases extensivly. A nm dump of the elf file returns: 0201699a W _main 0201699a T _system_main Also as an aside, if gdb can't find main() then it will try to do the symbolic lookup multiple times every time you dump the stack chain. I can do a patch for that as well if it could be conceivable that people have projects that don't have a function called main(). I would like to do a sanity check before I start hacking systab too much. Nick