diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-30 17:31:41 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-01-25 15:22:49 -0700 |
commit | d4396e0e97d21ad766089748fde1e11257384c49 (patch) | |
tree | d688f73ec95568444a01a01f2c85474e3db3c9db /gdb/psymtab.c | |
parent | 244ac24b51ba1375794eed93b58d5813e7c044ca (diff) | |
download | gdb-d4396e0e97d21ad766089748fde1e11257384c49.zip gdb-d4396e0e97d21ad766089748fde1e11257384c49.tar.gz gdb-d4396e0e97d21ad766089748fde1e11257384c49.tar.bz2 |
Reduce explicit use of gdb_stdout
In an earlier version of the pager rewrite series, it was important to
audit unfiltered output calls to see which were truly necessary.
This is no longer necessary, but it still seems like a decent cleanup
to change calls to avoid explicitly passing gdb_stdout. That is,
rather than using something like fprintf_unfiltered with gdb_stdout,
the code ought to use plain printf_unfiltered instead.
This patch makes this change. I went ahead and converted all the
_filtered calls I could find, as well, for the same clarity.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 406b3b3..0e9e822 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1421,9 +1421,9 @@ partial_symtab::expand_dependencies (struct objfile *objfile) /* Inform about additional files to be read in. */ if (info_verbose) { - fputs_filtered (" ", gdb_stdout); + puts_filtered (" "); wrap_here (""); - fputs_filtered ("and ", gdb_stdout); + puts_filtered ("and "); wrap_here (""); printf_filtered ("%s...", dependencies[i]->filename); wrap_here (""); /* Flush output */ @@ -1696,13 +1696,11 @@ maintenance_info_psymtabs (const char *regexp, int from_tty) psymtab->fullname ? psymtab->fullname : "(null)"); printf_filtered (" text addresses "); - fputs_filtered (paddress (gdbarch, - psymtab->text_low (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, + psymtab->text_low (objfile))); printf_filtered (" -- "); - fputs_filtered (paddress (gdbarch, - psymtab->text_high (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, + psymtab->text_high (objfile))); printf_filtered ("\n"); printf_filtered (" psymtabs_addrmap_supported %s\n", (psymtab->psymtabs_addrmap_supported @@ -1793,11 +1791,9 @@ maintenance_check_psymtabs (const char *ignore, int from_tty) printf_filtered ("Psymtab "); puts_filtered (ps->filename); printf_filtered (" covers bad range "); - fputs_filtered (paddress (gdbarch, ps->text_low (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, ps->text_low (objfile))); printf_filtered (" - "); - fputs_filtered (paddress (gdbarch, ps->text_high (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, ps->text_high (objfile))); printf_filtered ("\n"); continue; } @@ -1849,15 +1845,13 @@ maintenance_check_psymtabs (const char *ignore, int from_tty) printf_filtered ("Psymtab "); puts_filtered (ps->filename); printf_filtered (" covers "); - fputs_filtered (paddress (gdbarch, ps->text_low (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, ps->text_low (objfile))); printf_filtered (" - "); - fputs_filtered (paddress (gdbarch, ps->text_high (objfile)), - gdb_stdout); + puts_filtered (paddress (gdbarch, ps->text_high (objfile))); printf_filtered (" but symtab covers only "); - fputs_filtered (paddress (gdbarch, BLOCK_START (b)), gdb_stdout); + puts_filtered (paddress (gdbarch, BLOCK_START (b))); printf_filtered (" - "); - fputs_filtered (paddress (gdbarch, BLOCK_END (b)), gdb_stdout); + puts_filtered (paddress (gdbarch, BLOCK_END (b))); printf_filtered ("\n"); } } |