diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-11-06 13:57:52 -0600 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-12-10 13:23:01 -0600 |
commit | ab7d13f07027e6232a21448ef51f0a52a96738a9 (patch) | |
tree | ee2099c8cad324e6aea8a9f24a326fe5180e8380 /gdb/gdbserver/utils.c | |
parent | 0e7aaa728dc23f81a7809f3c5c9b90e85b978a8a (diff) | |
download | gdb-ab7d13f07027e6232a21448ef51f0a52a96738a9.zip gdb-ab7d13f07027e6232a21448ef51f0a52a96738a9.tar.gz gdb-ab7d13f07027e6232a21448ef51f0a52a96738a9.tar.bz2 |
Replace the remaining uses of strerror with safe_strerror
To do that, this patch makes IPA compile safe-strerror as well. Because
it doesn't use Gnulib, it calls the Glibc version of strerror_r directly.
Consequently this patch also removes the configure checks for strerror.
gdb/ChangeLog:
2019-12-10 Christian Biesinger <cbiesinger@google.com>
* config.in: Regenerate.
* configure: Regenerate.
* gdbsupport/agent.c (gdb_connect_sync_socket): Call
safe_strerror instead of strerror.
* gdbsupport/common.m4: Don't check for strerror.
* gdbsupport/safe-strerror.c: Support both the glibc version
of strerror_r and the XSI version.
gdb/gdbserver/ChangeLog:
2019-12-10 Christian Biesinger <cbiesinger@google.com>
* Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Don't check for strerror.
* linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
Call safe_strerror instead of strerror.
* server.h (strerror): Remove this now-unnecessary declaration.
* tracepoint.c (init_named_socket): Call safe_strerror instead of
strerror.
(gdb_agent_helper_thread): Likewise.
* utils.c (perror_with_name): Likewise.
Change-Id: I74848f072dcde75cb55c435ef9398dc8f958cd73
Diffstat (limited to 'gdb/gdbserver/utils.c')
-rw-r--r-- | gdb/gdbserver/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index 6a0e7a7..b72dd0e 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -47,7 +47,7 @@ perror_with_name (const char *string) const char *err; char *combined; - err = strerror (errno); + err = safe_strerror (errno); if (err == NULL) err = "unknown error"; |