* NEWS: Mention new options "set debug dwarf2-read" and
[deliverable/binutils-gdb.git] / gdb / psymtab.c
index 647368c800d94dab246bc0accbb452e09f081a64..c92cab86369328569c095e3fd4e644feb43bc8db 100644 (file)
@@ -1731,6 +1731,26 @@ allocate_psymtab (const char *filename, struct objfile *objfile)
   psymtab->next = objfile->psymtabs;
   objfile->psymtabs = psymtab;
 
+  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 psymtabs for objfile %s ...\n",
+                             last_objfile_name);
+       }
+      fprintf_unfiltered (gdb_stdlog,
+                         "Created psymtab 0x%lx for module %s.\n",
+                         (long) psymtab, filename);
+    }
+
   return (psymtab);
 }
 
This page took 0.024363 seconds and 4 git commands to generate.