This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support of gdb for Windows 64 native systems


On Sat, Oct 13, 2007 at 08:47:15AM -0700, Joel Brobecker wrote:
>> I'm not surprised, in particular because I've seen the patches applied
>> by the MinGW folks to produce a native MinGW port.  Personally, I
>> still think that at this magnitude of ifdef'ing we can certainly
>> justify two different targets.
>
>Yes, it's less clear at this point. Perhaps we can reduce further
>the differences. As this thread has shown me, the chopping I have
>already done was not nearly enough...
>
>> But this is not my call, and the prospects of finally having MinGW
>> support part of the official repository are so thrilling for me that
>> I'd hate if this argument would stand in the way.
>
>I'm like you, if keeping them separate is what the group decides,
>that's also fine with me. Might be more like Chris' call.

I'm ok with a limited number of ifdefs since I know that, as you say, it
is likely that 95% of the code will be similar.  It would be a
maintenance nightmare otherwise.

>> > +#ifdef _WIN32
>> > +  /* The executable must not be closed because it will not been possible to
>> > +     reopen it later under Windows NT if this executable is the one being
>> > +     debugged. */
>> > +
>> > +  if (strstr (name, ".exe") != NULL)
>> > +    sym_bfd->cacheable = FALSE;
>> > +  else
>> > +#endif
>> 
>> Doesn't Cygwin define _WIN32?  If it does, why do you need to
>> condition this fragment?
>
>I wasn't the author of this change, I think it was Jerome Guitton.
>Nonetheless, I think that the intent was to try to avoid unexpected
>impact on other platforms. The #ifdef can certainly be removed.

Cygwin doesn't define _WIN32 but I'm wondering why the above isn't
needed for Cygwin, too.

If we do go with the ifdef route, it would probably make sense to define
a WINDOWSISH or a MINGW_OR_CYGWIN variable.  I think there are other parts
of the build which do something like that.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]