Replace the remaining uses of strerror with safe_strerror
authorChristian Biesinger <cbiesinger@google.com>
Wed, 6 Nov 2019 19:57:52 +0000 (13:57 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 10 Dec 2019 19:23:01 +0000 (13:23 -0600)
commitab7d13f07027e6232a21448ef51f0a52a96738a9
treeee2099c8cad324e6aea8a9f24a326fe5180e8380
parent0e7aaa728dc23f81a7809f3c5c9b90e85b978a8a
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
15 files changed:
gdb/ChangeLog
gdb/config.in
gdb/configure
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/linux-i386-ipa.c
gdb/gdbserver/server.h
gdb/gdbserver/tracepoint.c
gdb/gdbserver/utils.c
gdb/gdbsupport/agent.c
gdb/gdbsupport/common.m4
gdb/gdbsupport/safe-strerror.c
This page took 0.026437 seconds and 4 git commands to generate.