From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Replace the remaining uses of strerror with safe_strerror
Date: Fri, 06 Dec 2019 20:36:00 -0000 [thread overview]
Message-ID: <CAPTJ0XH-tVAyf=BGB4HVBapqJ7_gNL5Xvt+vLnHvKRX+8+KtsQ@mail.gmail.com> (raw)
In-Reply-To: <ddc204c8-8353-f230-97f5-a6de9a6ba0b2@redhat.com>
On Fri, Dec 6, 2019 at 2:06 PM Pedro Alves <palves@redhat.com> wrote:
>
> On 11/26/19 7:59 PM, Christian Biesinger via gdb-patches wrote:
>
> > index c37db579f7..724a1d24db 100644
> > --- a/gdb/gdbsupport/safe-strerror.c
> > +++ b/gdb/gdbsupport/safe-strerror.c
> > @@ -27,11 +27,18 @@ safe_strerror (int errnum)
> > {
> > static thread_local char buf[1024];
> >
> > +#ifdef IN_PROCESS_AGENT
> > + /* IPA does not use Gnulib, but only supports Linux, so we can safely
> > + call the GNU version of strerror_r here. It is documented not to
> > + return NULL. */
> > + return strerror_r (errnum, buf, sizeof (buf));
>
> GDBserver and (I assume) the IPA can be built with other C runtimes on Linux,
> like musl and others. Do you know how musl behaves?
Oof, looks like they return int :(
http://git.musl-libc.org/cgit/musl/tree/src/string/strerror_r.c
I guess I'll change to #if defined(IN_PROCESS_AGENT) && defined(__GLIBC__)?
Christian
next prev parent reply other threads:[~2019-12-06 20:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 19:59 Christian Biesinger via gdb-patches
2019-11-26 21:11 ` [PATCH v2] " Christian Biesinger via gdb-patches
2019-12-06 20:06 ` [PATCH] " Pedro Alves
2019-12-06 20:36 ` Christian Biesinger via gdb-patches [this message]
2019-12-06 20:44 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-12-06 21:46 ` [PATCH] " Pedro Alves
2019-12-09 19:11 ` Christian Biesinger via gdb-patches
2019-12-09 19:13 ` [PATCH v3] " Christian Biesinger via gdb-patches
2019-12-10 16:41 ` Pedro Alves
2019-12-10 19:25 ` Christian Biesinger via gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPTJ0XH-tVAyf=BGB4HVBapqJ7_gNL5Xvt+vLnHvKRX+8+KtsQ@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox