aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-02 11:36:44 -0700
committerTom Tromey <tom@tromey.com>2022-03-29 12:46:24 -0600
commit0426ad513f93bb1c5805988e60d6f87fbe738860 (patch)
tree6ad0f94f9b2a907623df38db9dd7727fe80f5d51 /gdb/expprint.c
parent19a7b8ab871b92dee32a0ebffe274388d3426564 (diff)
downloadfsf-binutils-gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.zip
fsf-binutils-gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.gz
fsf-binutils-gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.bz2
Unify gdb puts functions
Now that filtered and unfiltered output can be treated identically, we can unify the puts family of functions. This is done under the name "gdb_puts". Most of this patch was written by script.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 381a10d..4dab3a2 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -138,9 +138,9 @@ dump_for_expression (struct ui_file *stream, int depth,
{
fprintf_filtered (stream, _("%*sType flags: "), depth, "");
if (flags & TYPE_INSTANCE_FLAG_CONST)
- fputs_filtered ("const ", stream);
+ gdb_puts ("const ", stream);
if (flags & TYPE_INSTANCE_FLAG_VOLATILE)
- fputs_filtered ("volatile", stream);
+ gdb_puts ("volatile", stream);
fprintf_filtered (stream, "\n");
}
@@ -152,24 +152,24 @@ dump_for_expression (struct ui_file *stream, int depth,
switch (flags & ~C_CHAR)
{
case C_WIDE_STRING:
- fputs_filtered (_("wide "), stream);
+ gdb_puts (_("wide "), stream);
break;
case C_STRING_16:
- fputs_filtered (_("u16 "), stream);
+ gdb_puts (_("u16 "), stream);
break;
case C_STRING_32:
- fputs_filtered (_("u32 "), stream);
+ gdb_puts (_("u32 "), stream);
break;
default:
- fputs_filtered (_("ordinary "), stream);
+ gdb_puts (_("ordinary "), stream);
break;
}
if ((flags & C_CHAR) != 0)
- fputs_filtered (_("char"), stream);
+ gdb_puts (_("char"), stream);
else
- fputs_filtered (_("string"), stream);
- fputs_filtered ("\n", stream);
+ gdb_puts (_("string"), stream);
+ gdb_puts ("\n", stream);
}
void
@@ -178,13 +178,13 @@ dump_for_expression (struct ui_file *stream, int depth,
{
fprintf_filtered (stream, _("%*sRange:"), depth, "");
if ((flags & RANGE_LOW_BOUND_DEFAULT) != 0)
- fputs_filtered (_("low-default "), stream);
+ gdb_puts (_("low-default "), stream);
if ((flags & RANGE_HIGH_BOUND_DEFAULT) != 0)
- fputs_filtered (_("high-default "), stream);
+ gdb_puts (_("high-default "), stream);
if ((flags & RANGE_HIGH_BOUND_EXCLUSIVE) != 0)
- fputs_filtered (_("high-exclusive "), stream);
+ gdb_puts (_("high-exclusive "), stream);
if ((flags & RANGE_HAS_STRIDE) != 0)
- fputs_filtered (_("has-stride"), stream);
+ gdb_puts (_("has-stride"), stream);
fprintf_filtered (stream, "\n");
}