From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13024 invoked by alias); 30 May 2005 19:55:06 -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 13017 invoked by uid 22791); 30 May 2005 19:55:03 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 30 May 2005 19:55:03 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DcqLi-000893-WA; Mon, 30 May 2005 15:55:00 -0400 Date: Mon, 30 May 2005 20:06:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Set current language when dumping symtab Message-ID: <20050530195458.GB31201@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20050504001955.GE2439@adacore.com> <20050528234905.GF22435@nevyn.them.org> <20050529021056.GF18754@adacore.com> <20050529025401.GA14380@nevyn.them.org> <20050530054538.GM18754@adacore.com> <20050530195338.GO18754@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050530195338.GO18754@adacore.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00645.txt.bz2 On Tue, May 31, 2005 at 05:53:39AM +1000, Joel Brobecker wrote: > +static void > +dump_symtab (struct objfile *objfile, struct symtab *symtab, > + struct ui_file *outfile) > +{ > + enum language saved_lang; > + volatile struct gdb_exception except; > + > + /* Set the current language to the language of the symtab we're dumping > + because certain routines used during dump_symtab() use the current > + language to print an image of the symbol. We'll restore it later. */ > + saved_lang = set_language (symtab->language); > + > + dump_symtab_1 (objfile, symtab, outfile); > + > + set_language (saved_lang); > +} > + Except now except is unused, and there's no reason not to fold this into dump_symtab. -- Daniel Jacobowitz CodeSourcery, LLC