From 077cbab270376098e90c841690f9e4439b63d3d4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 Oct 2019 21:13:10 -0600 Subject: 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 * 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 --- gdb/xcoffread.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'gdb/xcoffread.c') diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 69731a47911..66d6b9adf9d 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1869,25 +1869,11 @@ xcoff_psymtab_to_symtab_1 (struct objfile *objfile, legacy_psymtab *pst) static void xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile) { - if (self->readin) - { - fprintf_unfiltered - (gdb_stderr, "Psymtab for %s already read in. Shouldn't happen.\n", - self->filename); - return; - } + gdb_assert (!self->readin); if (((struct symloc *) self->read_symtab_private)->numsyms != 0 || self->number_of_dependencies) { - /* Print the message now, before reading the string table, - to avoid disconcerting pauses. */ - if (info_verbose) - { - printf_filtered ("Reading in symbols for %s...", self->filename); - gdb_flush (gdb_stdout); - } - next_symbol_text_func = xcoff_next_symbol_text; xcoff_psymtab_to_symtab_1 (objfile, self); @@ -1895,10 +1881,6 @@ xcoff_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); - - /* Finish up the debug error message. */ - if (info_verbose) - printf_filtered ("done.\n"); } } -- cgit v1.2.3-65-gdbad