From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23169 invoked by alias); 3 Jun 2005 00:10:17 -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 23153 invoked by uid 22791); 3 Jun 2005 00:10:09 -0000 Received: from s142-179-108-108.bc.hsia.telus.net (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 03 Jun 2005 00:10:09 +0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5D51C47959; Thu, 2 Jun 2005 17:10:07 -0700 (PDT) Date: Fri, 03 Jun 2005 00:10:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] Set current language when dumping symtab Message-ID: <20050603001007.GC960@adacore.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> <20050530195458.GB31201@nevyn.them.org> <20050601012932.GK2014@adacore.com> <20050601015952.GA3774@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <20050601015952.GA3774@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-06/txt/msg00023.txt.bz2 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 328 > OK - you have a good reason, that's enough for me :-) Cool :-). Here is the patch after removing the unused variable. 2005-06-02 Joel Brobecker * symmisc.c (dump_symtab_1): Renamed from dump_symtab. (dump_symtab): New function. Tested on x86-linux. OK to apply? Thanks, -- Joel --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="symmisc.c.diff" Content-length: 1213 Index: symmisc.c =================================================================== RCS file: /cvs/src/src/gdb/symmisc.c,v retrieving revision 1.38 diff -u -p -r1.38 symmisc.c --- symmisc.c 14 Feb 2005 14:37:38 -0000 1.38 +++ symmisc.c 2 Jun 2005 16:57:53 -0000 @@ -440,8 +440,8 @@ dump_psymtab (struct objfile *objfile, s } static void -dump_symtab (struct objfile *objfile, struct symtab *symtab, - struct ui_file *outfile) +dump_symtab_1 (struct objfile *objfile, struct symtab *symtab, + struct ui_file *outfile) { int i; struct dict_iterator iter; @@ -533,6 +533,22 @@ dump_symtab (struct objfile *objfile, st } } +static void +dump_symtab (struct objfile *objfile, struct symtab *symtab, + struct ui_file *outfile) +{ + enum language saved_lang; + + /* 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); +} + void maintenance_print_symbols (char *args, int from_tty) { --BXVAT5kNtrzKuDFl--