From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29844 invoked by alias); 8 Mar 2005 04:40:22 -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 29789 invoked from network); 8 Mar 2005 04:40:16 -0000 Received: from unknown (HELO priv-edtnes40.telusplanet.net) (199.185.220.224) by sourceware.org with SMTP; 8 Mar 2005 04:40:16 -0000 Received: from takamaka.act-europe.fr ([142.179.108.108]) by priv-edtnes40.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050308044011.ZGUJ14467.priv-edtnes40.telusplanet.net@takamaka.act-europe.fr>; Mon, 7 Mar 2005 21:40:11 -0700 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A6BA647DC0; Mon, 7 Mar 2005 20:40:06 -0800 (PST) Date: Tue, 08 Mar 2005 04:40:00 -0000 From: Joel Brobecker To: Elena Zannoni Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Improve "start" command for Ada Message-ID: <20050308044006.GC1750@adacore.com> References: <20041021034759.GP21300@gnat.com> <01c4b72e$Blat.v2.2.2$b14feb80@zahav.net.il> <20041021210951.GZ21300@gnat.com> <20041101194703.GH27334@gnat.com> <16810.33941.938548.637890@localhost.redhat.com> <20041201030309.GE1204@adacore.com> <20050209170543.GE18540@adacore.com> <20050307192951.GP1750@adacore.com> <16940.49472.585572.202096@localhost.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16940.49472.585572.202096@localhost.redhat.com> User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00109.txt.bz2 Just to confirm that I just checked in the following patch: 2005-03-07 Joel Brobecker * doc/observer.texi (executable_changed): New observer. * symtab.c: Include "observer.h". (find_main_name): New function. (main_name): If name_of_main is unset, then compute it using find_main_name. (symtab_observer_executable_changed): New function. (_initialize_symtab): Attach executable_changed observer. * exec.c: Include "observer.h". (exec_file_attach): Emit executable_changed notification. * symfile.c: Include "observer.h". (reread_symbols): Send an executable_changed if appropriate. * Makefile.in (exec.o): Add dependency on observer.h. (symfile.o): Likewise. (symtab.o): Likewise. This fixes the following 2 FAILs: FAIL: gdb.ada/null_record.exp: start (PRMS ada/1892) FAIL: gdb.ada/start.exp: start (PRMS ada/1892) Here is the comment that I added: /* FIXME: brobecker/2005-03-07: Another way of doing this would be to add a new method in the language vector, and call this method for each language until one of them returns a non-empty name. This would allow us to remove this hard-coded call to an Ada function. It is not clear that this is a better approach at this point, because all methods need to be written in a way such that false positives never be returned. For instance, it is important that a method does not return a wrong name for the main procedure if the main procedure is actually written in a different language. It is easy to guaranty this with Ada, since we use a special symbol generated only when the main in Ada to find the name of the main procedure. It is difficult however to see how this can be guarantied for languages such as C, for instance. This suggests that order of call for these methods becomes important, which means a more complicated approach. */ -- Joel