aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-01 12:18:47 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commitdcf1a2c8d2f5776796927d147f40214d23c818de (patch)
treeae0e553b000e0a12d62adf7428c5393bb78f736e /gdb/top.c
parent830df12588cfa80be673e710bee22761752ead11 (diff)
downloadfsf-binutils-gdb-dcf1a2c8d2f5776796927d147f40214d23c818de.zip
fsf-binutils-gdb-dcf1a2c8d2f5776796927d147f40214d23c818de.tar.gz
fsf-binutils-gdb-dcf1a2c8d2f5776796927d147f40214d23c818de.tar.bz2
Only have one API for unfiltered output
At the end of this series, the use of unfiltered output will be very restricted -- only places that definitely need it will use it. To this end, I thought it would be good to reduce the number of _unfiltered APIs that are exposed. This patch changes gdb so that only printf_unfiltered exists. (After this patch, the f* variants still exist as well, but those will be removed later.)
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 7831b4f..afd3c94 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -866,7 +866,7 @@ gdb_readline_no_editing (const char *prompt)
/* Don't use a _filtered function here. It causes the assumed
character position to be off, since the newline we read from
the user is not accounted for. */
- puts_unfiltered (prompt);
+ printf_unfiltered ("%s", prompt);
gdb_flush (gdb_stdout);
}
@@ -1365,11 +1365,7 @@ command_line_input (const char *prompt_arg, const char *annotation_suffix)
++source_line_number;
if (from_tty && annotation_level > 1)
- {
- puts_unfiltered ("\n\032\032pre-");
- puts_unfiltered (annotation_suffix);
- puts_unfiltered ("\n");
- }
+ printf_unfiltered ("\n\032\032pre-%s\n", annotation_suffix);
/* Don't use fancy stuff if not talking to stdin. */
if (deprecated_readline_hook