From 969107c54a602bf35d13a6290e77eb1ccf16bbb2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 23 May 2009 09:26:06 +0000 Subject: * symmisc.c (dump_symtab): Switch the current language to the language of the symtab we are dumping only if the symtab's language is neither language_auto nor language_unknown. * coffread.c (coff_symtab_read): Set language_minimal as the language for the "_globals_" pseudo-file. --- gdb/symmisc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'gdb/symmisc.c') diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 2e25c89..96fabc3 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -496,16 +496,23 @@ 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); + language to print an image of the symbol. We'll restore it later. + But use only real languages, not placeholders. */ + if (symtab->language != language_unknown + && symtab->language != language_auto) + { + enum language saved_lang; + + saved_lang = set_language (symtab->language); - dump_symtab_1 (objfile, symtab, outfile); + dump_symtab_1 (objfile, symtab, outfile); - set_language (saved_lang); + set_language (saved_lang); + } + else + dump_symtab_1 (objfile, symtab, outfile); } void -- cgit v1.1