diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-02 11:36:44 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-03-29 12:46:24 -0600 |
commit | 0426ad513f93bb1c5805988e60d6f87fbe738860 (patch) | |
tree | 6ad0f94f9b2a907623df38db9dd7727fe80f5d51 /gdb/macrocmd.c | |
parent | 19a7b8ab871b92dee32a0ebffe274388d3426564 (diff) | |
download | gdb-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/macrocmd.c')
-rw-r--r-- | gdb/macrocmd.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index 0771464..e1caeef 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -41,7 +41,7 @@ static struct cmd_list_element *macrolist; static void macro_inform_no_debuginfo (void) { - puts_filtered ("GDB has no preprocessor macro information for that code.\n"); + gdb_puts ("GDB has no preprocessor macro information for that code.\n"); } static void @@ -63,9 +63,9 @@ macro_expand_command (const char *exp, int from_tty) { gdb::unique_xmalloc_ptr<char> expanded = macro_expand (exp, *ms); - puts_filtered ("expands to: "); - puts_filtered (expanded.get ()); - puts_filtered ("\n"); + gdb_puts ("expands to: "); + gdb_puts (expanded.get ()); + gdb_puts ("\n"); } else macro_inform_no_debuginfo (); @@ -91,9 +91,9 @@ macro_expand_once_command (const char *exp, int from_tty) { gdb::unique_xmalloc_ptr<char> expanded = macro_expand_once (exp, *ms); - puts_filtered ("expands to: "); - puts_filtered (expanded.get ()); - puts_filtered ("\n"); + gdb_puts ("expands to: "); + gdb_puts (expanded.get ()); + gdb_puts ("\n"); } else macro_inform_no_debuginfo (); @@ -117,7 +117,7 @@ show_pp_source_pos (struct ui_file *stream, while (file->included_by) { fullname = macro_source_fullname (file->included_by); - fputs_filtered (_(" included at "), stream); + gdb_puts (_(" included at "), stream); fputs_styled (fullname.c_str (), file_name_style.style (), stream); fprintf_filtered (stream, ":%d\n", file->included_at_line); file = file->included_by; @@ -149,14 +149,14 @@ print_macro_definition (const char *name, { int i; - puts_filtered ("("); + gdb_puts ("("); for (i = 0; i < d->argc; i++) { - puts_filtered (d->argv[i]); + gdb_puts (d->argv[i]); if (i + 1 < d->argc) - puts_filtered (", "); + gdb_puts (", "); } - puts_filtered (")"); + gdb_puts (")"); } if (line != 0) |