aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symmisc.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4d80f6..08cb24d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-03 Joel Brobecker <brobecker@adacore.com>
+
+ * symmisc.c (dump_symtab_1): Renamed from dump_symtab.
+ (dump_symtab): New function.
+
2005-04-02 Joel Brobecker <brobecker@adacore.com>
* exceptions.h: Include ui-out.h.
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)
{