[review] Use safe_strerror in agent.c
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/748
......................................................................
Use safe_strerror in agent.c
ARI pointed out that agent.c is using strerror, where gdb generally
prefers safe_strerror. This patch fixes the problem.
gdb/ChangeLog
2019-12-05 Tom Tromey <tromey@adacore.com>
* gdbsupport/agent.c (gdb_connect_sync_socket): Use
safe_strerror.
(gdb_connect_sync_socket): Use safe_strerror.
Change-Id: Icdfcf9fef754253d6b17aeaa78329ea9bdc41bb1
---
M gdb/ChangeLog
M gdb/gdbsupport/agent.c
2 files changed, 8 insertions(+), 2 deletions(-)
Comments
Christian Biesinger has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/748
......................................................................
Patch Set 1:
See also https://sourceware.org/ml/gdb-patches/2019-11/msg00931.html
Christian Biesinger has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/748
......................................................................
Patch Set 1:
I believe this was fixed by the broader change in https://sourceware.org/ml/gdb-patches/2019-12/msg00372.html
Tom Tromey has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/748
......................................................................
Patch Set 1:
> Patch Set 1:
>
> I believe this was fixed by the broader change in https://sourceware.org/ml/gdb-patches/2019-12/msg00372.html
Yep, I'm dropping this patch.
Tom Tromey has abandoned this change. ( https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/748 )
Change subject: Use safe_strerror in agent.c
......................................................................
Abandoned
Obsoleted by another patch.
@@ -1,5 +1,11 @@
2019-12-05 Tom Tromey <tromey@adacore.com>
+ * gdbsupport/agent.c (gdb_connect_sync_socket): Use
+ safe_strerror.
+ (gdb_connect_sync_socket): Use safe_strerror.
+
+2019-12-05 Tom Tromey <tromey@adacore.com>
+
* gdbsupport/common-utils.c (string_printf, string_vprintf)
(string_vappendf): Add ARI comment.
@@ -149,7 +149,7 @@
res = fd = gdb_socket_cloexec (PF_UNIX, SOCK_STREAM, 0);
if (res == -1)
{
- warning (_("error opening sync socket: %s"), strerror (errno));
+ warning (_("error opening sync socket: %s"), safe_strerror (errno));
return -1;
}
@@ -168,7 +168,7 @@
{
warning (_("error connecting sync socket (%s): %s. "
"Make sure the directory exists and that it is writable."),
- path, strerror (errno));
+ path, safe_strerror (errno));
close (fd);
return -1;
}