aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.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/c-valprint.c
parent19a7b8ab871b92dee32a0ebffe274388d3426564 (diff)
downloadgdb-0426ad513f93bb1c5805988e60d6f87fbe738860.zip
gdb-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.gz
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/c-valprint.c')
-rw-r--r--gdb/c-valprint.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 0d30700..c034704 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -158,7 +158,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
demangle);
else if (options->addressprint)
{
- fputs_filtered (paddress (gdbarch, address), stream);
+ gdb_puts (paddress (gdbarch, address), stream);
want_space = 1;
}
@@ -169,7 +169,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
&& address != 0)
{
if (want_space)
- fputs_filtered (" ", stream);
+ gdb_puts (" ", stream);
val_print_string (unresolved_elttype, NULL, address, -1, stream, options);
}
else if (cp_is_vtbl_member (type))
@@ -185,10 +185,10 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
&& (vt_address == BMSYMBOL_VALUE_ADDRESS (msymbol)))
{
if (want_space)
- fputs_filtered (" ", stream);
- fputs_filtered (" <", stream);
- fputs_filtered (msymbol.minsym->print_name (), stream);
- fputs_filtered (">", stream);
+ gdb_puts (" ", stream);
+ gdb_puts (" <", stream);
+ gdb_puts (msymbol.minsym->print_name (), stream);
+ gdb_puts (">", stream);
want_space = 1;
}
@@ -199,7 +199,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
struct type *wtype;
if (want_space)
- fputs_filtered (" ", stream);
+ gdb_puts (" ", stream);
if (msymbol.minsym != NULL)
{
@@ -408,7 +408,7 @@ c_value_print_int (struct value *val, struct ui_file *stream,
const gdb_byte *valaddr = value_contents_for_printing (val).data ();
if (c_textual_element_type (type, options->format))
{
- fputs_filtered (" ", stream);
+ gdb_puts (" ", stream);
current_language->printchar (unpack_long (type, valaddr), type,
stream);
}