From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31514 invoked by alias); 29 May 2005 02:11:08 -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 30932 invoked by uid 22791); 29 May 2005 02:11:03 -0000 Received: from cpe-144-131-104-16.nsw.bigpond.net.au (HELO takamaka.act-europe.fr) (144.131.104.16) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 29 May 2005 02:11:03 +0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5F16A47958; Sun, 29 May 2005 12:10:56 +1000 (EST) Date: Sun, 29 May 2005 02:54:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Set current language when dumping symtab Message-ID: <20050529021056.GF18754@adacore.com> References: <20050504001955.GE2439@adacore.com> <20050528234905.GF22435@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050528234905.GF22435@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-05/txt/msg00601.txt.bz2 > > 2005-05-02 Joel Brobecker > > > > * symmisc.c (dump_symtab_1): Renamed from dump_symtab. > > (dump_symtab): New function. > > * Makefile.in (symmisc.o): Add dependency on ui-out.h. > > What's the new dependency on ui-out.h for? I didn't see anything > obvious in the patch. I agree it's not obvious. That's because of TRY_CATCH: #define TRY_CATCH(EXCEPTION,MASK) \ { \ EXCEPTIONS_SIGJMP_BUF *buf = \ exceptions_state_mc_init (uiout, &(EXCEPTION), (MASK)); \ EXCEPTIONS_SIGSETJMP (*buf); \ } \ while (exceptions_state_mc_action_iter ()) \ while (exceptions_state_mc_action_iter_1 ()) There is a dependency on "uiout". Perhaps it would be better to include that file from exceptions.h, rather than requiring all clients to include it themselves? I could send a separate RFA for that. > Also, what crashes? i.e. why specifically is it harmful to have the > wrong language set? In Ada, we rely on some special encoding to convey some information that certain debugging formats such as stabs can not express. In our case, one of the C symtabs had an entity whose name mislead the Ada language, and caused it to try to access something that didn't exist. This caused an internal-error, IIRC. > Also, I am not convinced that the new TRY_CATCH is necessary. The > only bit likely to throw is print_symbol, which is already wrapped in > catch_errors. That's true, and I'd be happy to remove it. But I thought that it might be safer to use it anyway, so that any change underneath that might cause an exception to be thrown does not affect this code. This is a hard guaranty that the language will never be changed as a side-effect of this command. -- Joel