[review v5] Import the strerror_r-posix module and use it in GDB.
Christian Biesinger (Code Review)
gerrit@gnutoolchain-gerrit.osci.io
Wed Nov 13 03:41:00 GMT 2019
Christian Biesinger has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/514
......................................................................
Patch Set 5:
> Patch Set 4: Code-Review+2
>
> This is OK. Thanks for doing this.
>
> With this, do you still see a reason for mingw not using the posix-strerror.c version too?
>
> I think this code in strerror-override.c ends up being equivalent to the FormatMessage call:
>
> # if HAVE_WINSOCK2_H
> /* WSA_INVALID_HANDLE maps to EBADF */
> /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
> /* WSA_INVALID_PARAMETER maps to EINVAL */
> case WSA_OPERATION_ABORTED:
> return "Overlapped operation aborted";
> case WSA_IO_INCOMPLETE:
> return "Overlapped I/O event object not in signaled state";
> case WSA_IO_PENDING:
> ...
>
> ... even if the messages may change a little.
Yes, I believe that's correct. I was wondering about pex_run but that takes care to use ENOENT, etc. I will make a patch for that.
Meanwhile I will have to land https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/622 before this patch, or else string.h won't be regenerated correctly, leading to compile errors unless you blow away your build directory...
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I5cfeb12a5203a4cd94a78581541e6085a68685c3
Gerrit-Change-Number: 514
Gerrit-PatchSet: 5
Gerrit-Owner: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Christian Biesinger <cbiesinger@google.com>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Wed, 13 Nov 2019 03:41:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
More information about the Gdb-patches
mailing list