aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c19
1 files changed, 13 insertions, 6 deletions
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