From: Joel Brobecker Date: Fri, 3 Jun 2005 23:27:28 +0000 (+0000) Subject: * symmisc.c (dump_symtab_1): Renamed from dump_symtab. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44b164c5140afff8f90bf9dd0a6606dda3b88c0d;p=binutils-gdb.git * symmisc.c (dump_symtab_1): Renamed from dump_symtab. (dump_symtab): New function. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d4d80f64602..08cb24d86da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2005-06-03 Joel Brobecker + + * symmisc.c (dump_symtab_1): Renamed from dump_symtab. + (dump_symtab): New function. + 2005-04-02 Joel Brobecker * exceptions.h: Include ui-out.h. diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 0d103b683de..f4408999ee5 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -440,8 +440,8 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, } 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, struct symtab *symtab, } } +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) {