Consolidate psymtab "Reading" messages

Each symbol reader implemented its own "Reading..." messages, and most
of them double-checked that a previously-expanded psymtab could not be
re-read.

This patch consolidates the message-printing, and changes these checks
into asserts.

gdb/ChangeLog
2020-01-26  Tom Tromey  <tom@tromey.com>

	* xcoffread.c (xcoff_read_symtab): Remove prints.  Add assert.
	* psymtab.c (psymtab_to_symtab): Print verbose "Reading"
	messages.
	* mdebugread.c (mdebug_read_symtab): Remove prints.
	* dwarf2read.c (dwarf2_psymtab::read_symtab): Remove prints.  Add
	assert.
	* dbxread.c (dbx_read_symtab): Remove prints.  Add assert.

Change-Id: I795be9710d42708299bb7b44972cffd27aec9413
This commit is contained in:
Tom Tromey
2019-10-22 21:13:10 -06:00
parent 891813beaa
commit 077cbab270
6 changed files with 36 additions and 78 deletions

View File

@ -277,12 +277,6 @@ static const char *mdebug_next_symbol_text (struct objfile *);
static void
mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
{
if (info_verbose)
{
printf_filtered (_("Reading in symbols for %s..."), self->filename);
gdb_flush (gdb_stdout);
}
next_symbol_text_func = mdebug_next_symbol_text;
psymtab_to_symtab_1 (objfile, self, self->filename);
@ -290,9 +284,6 @@ mdebug_read_symtab (legacy_psymtab *self, struct objfile *objfile)
/* Match with global symbols. This only needs to be done once,
after all of the symtabs and dependencies have been read in. */
scan_file_globals (objfile);
if (info_verbose)
printf_filtered (_("done.\n"));
}
/* File-level interface functions. */