From: Tom Tromey Date: Sun, 16 Apr 2023 18:40:33 +0000 (-0600) Subject: Remove error_stream X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e29e63040dd09449a21762bcacabdf31d580beee;p=binutils-gdb.git Remove error_stream error_stream is trivial and only used in a couple of spots in breakpoint.c. This patch removes it in favor of just writing it out at the spots where it was used. --- diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 54775000919..30d438d06df 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3138,7 +3138,7 @@ update_inserted_breakpoint_locations (void) if (error_flag) { target_terminal::ours_for_output (); - error_stream (tmp_error_stream); + error (("%s"), tmp_error_stream.c_str ()); } } @@ -3235,7 +3235,7 @@ insert_breakpoint_locations (void) You may have requested too many hardware breakpoints/watchpoints.\n"); } target_terminal::ours_for_output (); - error_stream (tmp_error_stream); + error (("%s"), tmp_error_stream.c_str ()); } } diff --git a/gdb/utils.c b/gdb/utils.c index 3cd2287a52e..3af54ec5179 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -166,12 +166,6 @@ verror (const char *string, va_list args) throw_verror (GENERIC_ERROR, string, args); } -void -error_stream (const string_file &stream) -{ - error (("%s"), stream.c_str ()); -} - /* Emit a message and abort. */ static void ATTRIBUTE_NORETURN diff --git a/gdb/utils.h b/gdb/utils.h index 29ff376bb52..2d831bac184 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -285,8 +285,6 @@ extern void (*deprecated_error_begin_hook) (void); extern const char *warning_pre_print; -extern void error_stream (const string_file &) ATTRIBUTE_NORETURN; - extern void demangler_vwarning (const char *file, int line, const char *, va_list ap) ATTRIBUTE_PRINTF (3, 0);