From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16626 invoked by alias); 11 Jul 2002 14:57:19 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16619 invoked from network); 11 Jul 2002 14:57:18 -0000 Received: from unknown (HELO tetsuo.nj.caldera.com) (63.124.204.226) by sources.redhat.com with SMTP; 11 Jul 2002 14:57:18 -0000 Received: from caldera.com (localhost.localdomain [127.0.0.1]) by tetsuo.nj.caldera.com (8.11.6/8.11.6) with ESMTP id g6BF9c404758; Thu, 11 Jul 2002 11:09:38 -0400 Message-ID: <3D2D9FB1.87EABC20@caldera.com> Date: Thu, 11 Jul 2002 08:07:00 -0000 From: Petr Sorfa Organization: Caldera X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: "gdb-patches@sources.redhat.com" Subject: Re: [PATCH] DW_AT_calling_convention support REV 2 References: <3D2C80A8.35D678FE@caldera.com> <20020710184710.GA923@nevyn.them.org> <3D2C8D8C.E5127E28@caldera.com> <20020710193458.GA28939@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00226.txt.bz2 Hi Daniel, > main_name(), I assume. Basically I would like everywhere that > currently checks by a strcmp/STREQ with main_name() to use > is_main_symbol () instead, etc. Things that call lookup_symbol on > main_name() should just use get_main_symbol () if possible. Then > set_main_name () could include calling lookup_symbol(main_name()), so > that get_main_symbol would always be valid, etc.... Unforuntately after looking at this I realized this will not work always correctly. It is quite possible that a symbol is not created for "main" until much later. There are calls to set_main_name() before the symbol is created, so your proposition to do a lookup_symbol() in set_main_name() will not work in all cases. I suggest that the get_main_symbol() is altered to your suggestions, to which I want to add further checks such as ensuring that the main name is equal to the main symbol's name. If this is ok with you, I'll do a rev 3 patch for this and submit it. Petr