diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-01 13:35:13 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 0e37c0638c15f7ed9215029d9185498ce2741603 (patch) | |
tree | c7942993dd96dac29778bab96e00c74ac9f89823 /gdb/cli-out.c | |
parent | c8d74a7b4b341f7498a3827555451924cabdd0f1 (diff) | |
download | gdb-0e37c0638c15f7ed9215029d9185498ce2741603.zip gdb-0e37c0638c15f7ed9215029d9185498ce2741603.tar.gz gdb-0e37c0638c15f7ed9215029d9185498ce2741603.tar.bz2 |
Remove vfprintf_styled_no_gdbfmt
This removes vfprintf_styled_no_gdbfmt, inlining it at the sole point
of call.
Diffstat (limited to 'gdb/cli-out.c')
-rw-r--r-- | gdb/cli-out.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/cli-out.c b/gdb/cli-out.c index b2daad1..a7fcc62 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -230,11 +230,14 @@ cli_ui_out::do_message (const ui_file_style &style, if (m_suppress_output) return; - /* Use the "no_gdbfmt" variant here to avoid recursion. - vfprintf_styled calls into cli_ui_out::message to handle the - gdb-specific printf formats. */ - vfprintf_styled_no_gdbfmt (m_streams.back (), style, - !test_flags (unfiltered_output), format, args); + std::string str = string_vprintf (format, args); + if (!str.empty ()) + { + if (test_flags (unfiltered_output)) + fputs_styled_unfiltered (str.c_str (), style, m_streams.back ()); + else + fputs_styled (str.c_str (), style, m_streams.back ()); + } } void |