aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 37d98d9..01252e2 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2873,6 +2873,26 @@ allocate_symtab (const char *filename, struct objfile *objfile)
symtab->next = objfile->symtabs;
objfile->symtabs = symtab;
+ if (symtab_create_debug)
+ {
+ /* Be a bit clever with debugging messages, and don't print objfile
+ every time, only when it changes. */
+ static char *last_objfile_name = NULL;
+
+ if (last_objfile_name == NULL
+ || strcmp (last_objfile_name, objfile->name) != 0)
+ {
+ xfree (last_objfile_name);
+ last_objfile_name = xstrdup (objfile->name);
+ fprintf_unfiltered (gdb_stdlog,
+ "Creating one or more symtabs for objfile %s ...\n",
+ last_objfile_name);
+ }
+ fprintf_unfiltered (gdb_stdlog,
+ "Created symtab 0x%lx for module %s.\n",
+ (long) symtab, filename);
+ }
+
return (symtab);
}