diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-04-11 13:14:04 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-04-11 13:14:04 +0000 |
commit | f1b2361fa0acd8b3cac642a4434340c1487c8221 (patch) | |
tree | 164d7f83a57e0d1c4cd86cb8ce4a1fb9d5d0616f /gdb/remote.c | |
parent | d2a545bbe6e0f19b3a66a9371534703b92013b05 (diff) | |
download | gdb-f1b2361fa0acd8b3cac642a4434340c1487c8221.tar.gz |
gdb/
* remote.c (unpush_and_perror): Add output message final dot.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 11 |
1 files changed, 5 insertions, 6 deletions
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. */ |