Re: Support of gdb for Windows 64 native systems

Eli Zaretskii
2007-10-12T20:29:48Z

> Date: Fri, 12 Oct 2007 10:42:18 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: drow@false.org, Kai.Tietz@onevision.com, gdb@sourceware.org
>
> > So what? the duplicates will never be linked into the same build. We
> > already have duplicate code in targets that are alike, one more cannot
> > hurt.
>
> I have to disagree on that. We're looking at duplicating 95% of
> the code. That means duplicating 95% of the maintenance.

I assumed the two files will have different maintainers, too.

> > > In our merge, I counted 5 instances of "ifdef/ifndef __MINGW32__
> >
> > You need to count "ifdef __CYGWIN__" as well.
>
> Actually, currently all except one such ifdef are used as "if on
> windows". They look like this:
>
> #if defined(_WIN32) || defined(__CYGWIN__)

Not in the GDB CVS.

> #ifdef __MINGW32__
> #define MAXPATHLEN PATH_MAX
> #endif

This, for example, is strictly speaking wrong on Windows: Windows
supports much longer file names (up to 32K), if you use Unicode APIs.

> > > The rest seems to be in i386-win32-tdep.c which is a separate file.
> >
> > I don't see this file, either, so I cannot comment on that.
>
> Yes, this is normal, because this file is not part of the FSF CVS.
> It's a separate file that would only be needed for native win32 support.

Well, in that case, maybe you already refactored the code in a way
that makes my points moot.