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: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Pedro Alves'" <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 16 Dec 2013 23:50:00 +0100
- 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: <52ab8d0e dot 8aa2420a dot 30ff dot ffffd8f1SMTPIN_ADDED_BROKEN at mx dot google dot com> <52AF3493 dot 9090708 at redhat dot com>
> -----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