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/gcore.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/gcore.c')
-rw-r--r-- | gdb/gcore.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c index 63ebbb7..5e3aa68 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -140,9 +140,8 @@ gcore_command (const char *args, int from_tty) } if (info_verbose) - fprintf_filtered (gdb_stdout, - "Opening corefile '%s' for output.\n", - corefilename.get ()); + printf_filtered ("Opening corefile '%s' for output.\n", + corefilename.get ()); if (target_supports_dumpcore ()) target_dumpcore (corefilename.get ()); @@ -161,7 +160,7 @@ gcore_command (const char *args, int from_tty) unlink_file.keep (); } - fprintf_filtered (gdb_stdout, "Saved corefile %s\n", corefilename.get ()); + printf_filtered ("Saved corefile %s\n", corefilename.get ()); } static enum bfd_architecture @@ -385,8 +384,8 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, { if (info_verbose) { - fprintf_filtered (gdb_stdout, "Ignore segment, %s bytes at %s\n", - plongest (size), paddress (target_gdbarch (), vaddr)); + printf_filtered ("Ignore segment, %s bytes at %s\n", + plongest (size), paddress (target_gdbarch (), vaddr)); } return 0; @@ -445,8 +444,8 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, if (info_verbose) { - fprintf_filtered (gdb_stdout, "Save segment, %s bytes at %s\n", - plongest (size), paddress (target_gdbarch (), vaddr)); + printf_filtered ("Save segment, %s bytes at %s\n", + plongest (size), paddress (target_gdbarch (), vaddr)); } bfd_set_section_size (osec, size); |