aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:42:07 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commita11ac3b3e8ff6769badcf0041894f6c5acc1b94f (patch)
tree09cfacc40b2fbe929ca0013869915ddce49378ba /gdb/mi
parent0426ad513f93bb1c5805988e60d6f87fbe738860 (diff)
downloadgdb-a11ac3b3e8ff6769badcf0041894f6c5acc1b94f.zip
gdb-a11ac3b3e8ff6769badcf0041894f6c5acc1b94f.tar.gz
gdb-a11ac3b3e8ff6769badcf0041894f6c5acc1b94f.tar.bz2
Unify gdb putc functions
Now that filtered and unfiltered output can be treated identically, we can unify the putc family of functions. This is done under the name "gdb_putc". Most of this patch was written by script.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-console.c8
-rw-r--r--gdb/mi/mi-out.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index 5043e9b..5cdb486 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -79,15 +79,15 @@ mi_console_file::flush ()
gdb_puts (m_prefix, m_raw);
if (m_quote)
{
- fputc_unfiltered (m_quote, m_raw);
+ gdb_putc (m_quote, m_raw);
m_raw->putstrn (buf, length_buf, m_quote);
- fputc_unfiltered (m_quote, m_raw);
- fputc_unfiltered ('\n', m_raw);
+ gdb_putc (m_quote, m_raw);
+ gdb_putc ('\n', m_raw);
}
else
{
m_raw->putstrn (buf, length_buf, 0);
- fputc_unfiltered ('\n', m_raw);
+ gdb_putc ('\n', m_raw);
}
gdb_flush (m_raw);
}
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index ff93cb3..c84cc55 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -199,7 +199,7 @@ mi_ui_out::field_separator ()
if (m_suppress_field_separator)
m_suppress_field_separator = false;
else
- fputc_unfiltered (',', m_streams.back ());
+ gdb_putc (',', m_streams.back ());
}
void
@@ -216,11 +216,11 @@ mi_ui_out::open (const char *name, ui_out_type type)
switch (type)
{
case ui_out_type_tuple:
- fputc_unfiltered ('{', stream);
+ gdb_putc ('{', stream);
break;
case ui_out_type_list:
- fputc_unfiltered ('[', stream);
+ gdb_putc ('[', stream);
break;
default:
@@ -236,11 +236,11 @@ mi_ui_out::close (ui_out_type type)
switch (type)
{
case ui_out_type_tuple:
- fputc_unfiltered ('}', stream);
+ gdb_putc ('}', stream);
break;
case ui_out_type_list:
- fputc_unfiltered (']', stream);
+ gdb_putc (']', stream);
break;
default: