This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: "Invalid parameter passed to C runtime function" from MinGW GDB
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 20 Nov 2018 18:53:57 +0200
- Subject: Re: "Invalid parameter passed to C runtime function" from MinGW GDB
- References: <838t1qtjty.fsf@gnu.org> <874lccpvra.fsf@tromey.com>
> From: Tom Tromey <tom@tromey.com>
> Cc: gdb-patches@sourceware.org
> Date: Mon, 19 Nov 2018 15:06:49 -0700
>
> Eli> diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
> Eli> index d4bd1a8..3fa035a 100644
> Eli> --- a/gdb/common/filestuff.c
> Eli> +++ b/gdb/common/filestuff.c
> Eli> @@ -300,8 +300,10 @@ gdb_fopen_cloexec (const char *filename, const char *opentype)
> Eli> skip it. E.g., the Windows runtime issues an "Invalid parameter
> Eli> passed to C runtime function" OutputDebugString warning for
> Eli> unknown modes. Assume that if O_CLOEXEC is zero, then "e" isn't
> Eli> - supported. */
> Eli> - static int fopen_e_ever_failed_einval = O_CLOEXEC == 0;
> Eli> + supported. On MinGW, O_CLOEXEC is an alias of O_NOINHERIT, and
> Eli> + "e" isn't supported. */
> Eli> + static int fopen_e_ever_failed_einval =
> Eli> + O_CLOEXEC == 0 || O_CLOEXEC == O_NOINHERIT;
>
> Looks reasonable to me, thanks.
Thanks, pushed to master. (Sorry for an empty message I sent by
mistake a few minutes ago.)