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/target-debug.h | |
parent | 19a7b8ab871b92dee32a0ebffe274388d3426564 (diff) | |
download | binutils-0426ad513f93bb1c5805988e60d6f87fbe738860.zip binutils-0426ad513f93bb1c5805988e60d6f87fbe738860.tar.gz binutils-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/target-debug.h')
-rw-r--r-- | gdb/target-debug.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/target-debug.h b/gdb/target-debug.h index e7a5098..ee494d0 100644 --- a/gdb/target-debug.h +++ b/gdb/target-debug.h @@ -42,7 +42,7 @@ /* Helper macro. */ #define target_debug_do_print(E) \ - fputs_unfiltered ((E), gdb_stdlog); + gdb_puts ((E), gdb_stdlog); #define target_debug_print_enum_target_object(X) \ target_debug_do_print (plongest (X)) @@ -180,7 +180,7 @@ static void target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status) { - fputs_unfiltered (status->to_string ().c_str (), gdb_stdlog); + gdb_puts (status->to_string ().c_str (), gdb_stdlog); } @@ -195,13 +195,13 @@ target_debug_print_target_wait_flags (target_wait_flags options) { std::string str = target_options_to_string (options); - fputs_unfiltered (str.c_str (), gdb_stdlog); + gdb_puts (str.c_str (), gdb_stdlog); } static void target_debug_print_signals (gdb::array_view<const unsigned char> sigs) { - fputs_unfiltered ("{", gdb_stdlog); + gdb_puts ("{", gdb_stdlog); for (size_t i = 0; i < sigs.size (); i++) if (sigs[i] != 0) @@ -209,7 +209,7 @@ target_debug_print_signals (gdb::array_view<const unsigned char> sigs) fprintf_unfiltered (gdb_stdlog, " %s", gdb_signal_to_name ((enum gdb_signal) i)); } - fputs_unfiltered (" }", gdb_stdlog); + gdb_puts (" }", gdb_stdlog); } static void @@ -221,14 +221,14 @@ target_debug_print_size_t (size_t size) static void target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector) { - fputs_unfiltered ("{", gdb_stdlog); + gdb_puts ("{", gdb_stdlog); for (size_t i = 0; i < vector.size (); i++) { fprintf_unfiltered (gdb_stdlog, " %s", phex_nz (vector[i], 1)); } - fputs_unfiltered (" }", gdb_stdlog); + gdb_puts (" }", gdb_stdlog); } static void |