This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC 9/9] Unify windows specifics into common/windows-hdep files
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Eli Zaretskii'" <eliz at gnu dot org>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 30 Mar 2011 23:32:49 +0200
- Subject: RE: [RFC 9/9] Unify windows specifics into common/windows-hdep files
- References: <00ba01cbeed2$bbf50150$33df03f0$%muller@ics-cnrs.unistra.fr> <83ipv0qtl5.fsf@gnu.org>
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé?: mercredi 30 mars 2011 21:47
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: Re: [RFC 9/9] Unify windows specifics into common/windows-hdep
files
>
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Date: Wed, 30 Mar 2011 14:05:17 +0200
> >
> > if (strcasecmp (buf, "ntdll.dll") == 0)
> > {
> > - GetSystemDirectory (buf, sizeof (buf));
> > + GetSystemDirectoryA (buf, sizeof (buf));
>
> This will be a problem if we ever support a _UNICODE build.
No because buf always a char array in the code and
thus require the use of GetSystemDirectoryA function
even if Unicode functions are used elsewhere.
> > + if (windows_conv_path (WINDOWS_POSIX_TO_NATIVE, exec_file,
> real_path,
> > + __PMAX * sizeof (win_buf_t)) < 0)
> > error (_("Error starting executable: %d"), errno);
>
> But windows_conv_path never returns a negative value, it returns zero
> if it fails.
At least for Cygwin, windows_conv_path simply returns cygwinconv_path
result, his is why I didn't change the code arounf it:
I agree that I need to improve the mingw part of that function
according to your comments for RFC 1/9.
> Thanks.
Thank you for your comments
Pierre