From: Jan Kratochvil Date: Thu, 11 Apr 2013 13:14:04 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6cb50a2010f55f3e2b5e7c65d5fa40c70eb369d;p=binutils-gdb.git gdb/ * remote.c (unpush_and_perror): Add output message final dot. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 75893a768b6..0eb03ce95b3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-04-11 Jan Kratochvil + + * remote.c (unpush_and_perror): Add output message final dot. + 2013-04-11 Yao Qi * tracepoint.c (tfile_interp_line): Fit parameters line and diff --git a/gdb/remote.c b/gdb/remote.c index de075c88e3b..f0dbba668cd 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7036,18 +7036,17 @@ remote_files_info (struct target_ops *ignore) /* Close/unpush the remote target, and throw a TARGET_CLOSE_ERROR error to higher layers. Called when a serial error is detected. The exception message is STRING, followed by a colon and a blank, - then the system error message for errno at function entry. */ + the system error message for errno at function entry and final dot + for output compatibility with throw_perror_with_name. */ static void unpush_and_perror (const char *string) { - char *errstr; - - errstr = xstrprintf ("%s: %s", string, safe_strerror (errno)); - make_cleanup (xfree, errstr); + int saved_errno = errno; remote_unpush_target (); - throw_error (TARGET_CLOSE_ERROR, "%s", errstr); + throw_error (TARGET_CLOSE_ERROR, "%s: %s.", string, + safe_strerror (saved_errno)); } /* Read a single character from the remote end. */