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

Pierre Muller
2013-12-17T08:43:57Z

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Yao Qi
> Envoyé : mardi 17 décembre 2013 01:41
> À : Pedro Alves
> Cc : Pierre Muller; 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/17/2013 02:05 AM, Pedro Alves wrote:
> > At this level we're thinking in terms of Win32 debug API, and
> > it's irrelevant what Cygwin thinks is the Posix path of
> > ntdll.dll. If this is indeed ntdll.dll, then the following
> > windows_make_so call will then do that conversion before
> > recording the dll name.
>
> My point is we use cygwin_conv_path to convert the path to type "char
> *"
> and then compare whether it is ntdll.dll.

As Pedro explained, I don't think this is useful here,
because we only check the filename part of the DLL,
this is not changed by the cygwin_conv_path which only converts
Windows OS paths into cygwin paths.
Moreover, windows_make_so expect a windows OS path,
which is copied into so_original_name
while so_name gets the return value of cygwin_conv_path.

Thus I would expect that your idea to call cygwin_conv_path
inside windows_ensure_ntddl_loaded would lead to a
failure at the start of the windows_make_so which calls the
Win32 API function FindFirstFile.

I hope this clarifies the point.

Pierre Muller