RE: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing

Pierre Muller
2013-12-16T22:50:15Z

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé : lundi 16 décembre 2013 18:13
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix cygwin compilation failure due to nameless
> LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
>
> On 12/13/2013 10:37 PM, Pierre Muller wrote:
> > Following this thread
> > https://sourceware.org/ml/gdb-patches/2013-12/msg00073.html
> >
> > The patch
> > https://sourceware.org/ml/gdb-cvs/2013-12/msg00054.html
> >
> > introduced a failure for cygwin native build.
> > The problem is that __USEWIDE is not considered in the patch.
> >
> > The patch below fixes this compilation error
> > and should allow cygwin to work as mingw.
>
> Looks fine to me.

Thanks for the approval,
fix committed with Yao's suggestion concerning the ChangeLog entry.
Thank you, Yao!

> (Though I wonder why not just use GetModuleFileNameExA
> explicitly. In fact, it's what gdbserver does).
This is just that GetModuleFileNameEx is a function variable which is set
to
bad_GetModuleFileNameEx if it is not found inside kernel32 DLL.

Using GetModuleFileNameExA would still require that check,
separately from GetModuleFileNameEx, so the change would have been bigger
without any benefit, at least to my understanding...

Pierre Muller