This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, gdb-patches at sourceware dot org
- Date: Mon, 16 Dec 2013 18:05:24 +0000
- Subject: Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
- Authentication-results: sourceware.org; auth=none
- References: <002f01cef853$f44500e0$dccf02a0$ at muller@ics-cnrs.unistra.fr> <52AE633E dot 9020604 at codesourcery dot com>
On 12/16/2013 02:19 AM, Yao Qi wrote:
> GetModuleFileNameEx is also used in get_module_name, so probably we can
> copy its pattern here too
>
> #ifdef __CYGWIN__
> len = GetModuleFileNameEx (current_process_handle, DllHandle,
> pathbuf, __PMAX);
> if (cygwin_conv_path (CCP_WIN_W_TO_POSIX, pathbuf, dll_name_ret,
> __PMAX) < 0)
> ...
> #else
> len = GetModuleFileNameEx (current_process_handle,
> DllHandle, dll_name_ret, __PMAX);
> #endif
>
> and code is more consistent on using GetModuleFileNameEx.
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.
--
Pedro Alves