gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 11 Apr 2013 13:14:04 +0000 (13:14 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 11 Apr 2013 13:14:04 +0000 (13:14 +0000)
* remote.c (unpush_and_perror): Add output message final dot.

gdb/ChangeLog
gdb/remote.c

index 75893a768b6463fe235a8f0e9307182971c9347d..0eb03ce95b371777218d6c7939e6a031dc45ca6f 100644 (file)
@@ -1,3 +1,7 @@
+2013-04-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * remote.c (unpush_and_perror): Add output message final dot.
+
 2013-04-11  Yao Qi  <yao@codesourcery.com>
 
        * tracepoint.c (tfile_interp_line): Fit parameters line and
index de075c88e3b24ead5fa0aa8063e2c982871d3484..f0dbba668cdb5584596e0a90579dbee72dfe07b5 100644 (file)
@@ -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.  */
This page took 0.036299 seconds and 4 git commands to generate.