diff options
author | Tom Tromey <tom@tromey.com> | 2021-12-31 14:34:07 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 9b7167182d1f6fef32c264587bbc00c7f9bd21f2 (patch) | |
tree | 23ffdf79803d8daf6a9d7777443f7869b30fa6a1 /gdb/utils.c | |
parent | dcf1a2c8d2f5776796927d147f40214d23c818de (diff) | |
download | gdb-9b7167182d1f6fef32c264587bbc00c7f9bd21f2.zip gdb-9b7167182d1f6fef32c264587bbc00c7f9bd21f2.tar.gz gdb-9b7167182d1f6fef32c264587bbc00c7f9bd21f2.tar.bz2 |
Add puts_unfiltered method to ui_file
When the pager is rewritten as a ui_file, gdb will still need a way to
bypass the filtering. After examining a few approaches, I chose this
patch, which adds a puts_unfiltered method to ui_file. For most
implementations of ui_file, this will just delegate to puts. This
patch also switches printf_unfiltered to use the new method.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index a071721..8f479c4 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2025,7 +2025,9 @@ printf_unfiltered (const char *format, ...) va_list args; va_start (args, format); - vfprintf_unfiltered (gdb_stdout, format, args); + string_file file (gdb_stdout->can_emit_style_escape ()); + file.vprintf (format, args); + gdb_stdout->puts_unfiltered (file.string ().c_str ()); va_end (args); } |