diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-16 21:52:04 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-10-04 13:40:10 -0600 |
commit | 22068491adac735905948fd4c2e9aaacf9e22e06 (patch) | |
tree | 13bb37631065cb21ef3f0e71a5a8e98de685dc39 /gdb/psymtab.c | |
parent | 9fdd7193e7fd041e9ff311a69dc02aecef53070f (diff) | |
download | gdb-22068491adac735905948fd4c2e9aaacf9e22e06.zip gdb-22068491adac735905948fd4c2e9aaacf9e22e06.tar.gz gdb-22068491adac735905948fd4c2e9aaacf9e22e06.tar.bz2 |
Use filtered printing when reading symbols
While working on this series, I found some unfiltered prints that
didn't make sense -- many things, like complaints, are filtered, while
their context (in this case the "Reading symbols ..." messages) may
not be.
This patch changes some spots in symbol reading to use filtered
prints. I think this is preferable overall; in fact I'd go farther
and say that unfiltered printing should just be removed.
One of these spots was not strictly related (the change to
dump_psymtab), but I left it in partly because it makes psymtab.c
"unfiltered-clean", and partly because it is an example of filtered
and unfiltered printing being mixed in the same function.
gdb/ChangeLog
2018-10-04 Tom Tromey <tom@tromey.com>
* symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
(separate_debug_file_exists, find_separate_debug_file)
(add_symbol_file_command, reread_symbols, allocate_symtab)
(allocate_compunit_symtab): Use filtered printing, not
unfiltered.
* psymtab.c (require_partial_symbols, dump_psymtab)
(allocate_psymtab): Use filtered printing, not unfiltered.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index dc35ca8..219357e 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -79,8 +79,8 @@ require_partial_symbols (struct objfile *objfile, int verbose) { if (verbose) { - printf_unfiltered (_("Reading symbols from %s..."), - objfile_name (objfile)); + printf_filtered (_("Reading symbols from %s..."), + objfile_name (objfile)); gdb_flush (gdb_stdout); } (*objfile->sf->sym_read_psymbols) (objfile); @@ -95,11 +95,11 @@ require_partial_symbols (struct objfile *objfile, int verbose) if (!objfile_has_symbols (objfile)) { wrap_here (""); - printf_unfiltered (_("(no debugging symbols found)...")); + printf_filtered (_("(no debugging symbols found)...")); wrap_here (""); } - printf_unfiltered (_("done.\n")); + printf_filtered (_("done.\n")); } } } @@ -931,10 +931,10 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab, fprintf_filtered (outfile, "(object "); gdb_print_host_address (psymtab, outfile); fprintf_filtered (outfile, ")\n\n"); - fprintf_unfiltered (outfile, " Read from object file %s (", - objfile_name (objfile)); + fprintf_filtered (outfile, " Read from object file %s (", + objfile_name (objfile)); gdb_print_host_address (objfile, outfile); - fprintf_unfiltered (outfile, ")\n"); + fprintf_filtered (outfile, ")\n"); if (psymtab->readin) { @@ -1766,13 +1766,13 @@ allocate_psymtab (const char *filename, struct objfile *objfile) { xfree (last_objfile_name); last_objfile_name = xstrdup (objfile_name (objfile)); - fprintf_unfiltered (gdb_stdlog, - "Creating one or more psymtabs for objfile %s ...\n", - last_objfile_name); + fprintf_filtered (gdb_stdlog, + "Creating one or more psymtabs for objfile %s ...\n", + last_objfile_name); } - fprintf_unfiltered (gdb_stdlog, - "Created psymtab %s for module %s.\n", - host_address_to_string (psymtab), filename); + fprintf_filtered (gdb_stdlog, + "Created psymtab %s for module %s.\n", + host_address_to_string (psymtab), filename); } return psymtab; |