diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-05-23 09:26:06 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-05-23 09:26:06 +0000 |
commit | 969107c54a602bf35d13a6290e77eb1ccf16bbb2 (patch) | |
tree | fadd51078cd022bdbf12e8ea9ebdaa15883347f0 /gdb/symmisc.c | |
parent | 65b02341cc8e36be5467123913457f3dd0fb6754 (diff) | |
download | gdb-969107c54a602bf35d13a6290e77eb1ccf16bbb2.zip gdb-969107c54a602bf35d13a6290e77eb1ccf16bbb2.tar.gz gdb-969107c54a602bf35d13a6290e77eb1ccf16bbb2.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r-- | gdb/symmisc.c | 19 |
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 |