aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2005-06-03 23:27:28 +0000
committerJoel Brobecker <brobecker@gnat.com>2005-06-03 23:27:28 +0000
commit44b164c5140afff8f90bf9dd0a6606dda3b88c0d (patch)
tree10a1cfc7cdff2b1f1cf4a2b5085394d10e84ec1d /gdb/symmisc.c
parentb7d4af3a128f09640f4d0982d7d9b9333eadccdf (diff)
downloadgdb-44b164c5140afff8f90bf9dd0a6606dda3b88c0d.zip
gdb-44b164c5140afff8f90bf9dd0a6606dda3b88c0d.tar.gz
gdb-44b164c5140afff8f90bf9dd0a6606dda3b88c0d.tar.bz2
* symmisc.c (dump_symtab_1): Renamed from dump_symtab.
(dump_symtab): New function.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 0d103b6..f440899 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)
{