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


> Actually, wouldn't it be better to separate the two completely?  That
> should avoid a lot of ugly ifdefs, and make each native backend much
> cleaner, I think.

The issue with that is that we'll end up duplicating a bit of code.
In our merge, I counted 5 instances of "ifdef/ifndef __MINGW32__
in total, all of them in win32-nat.c:
  - One to define MAXPATHLEN: Should really be done in a proper way,
    so should go away
  - One to avoid the #include <sys/procfs.h>: Should also be done
    using HAVE_SYS_PROCFS_H, so should also go away
  - 3 #ifdef __MINGW32__ in create_inferior to replace unix-style
    IO handling with Windows-style IO handling. Can we call functions
    like GetStdHandle from the cygwin compiler, or do we need the
    MinGW headers for that? Perhaps the mingw code could also
    work with cygwin?

The rest seems to be in i386-win32-tdep.c which is a separate file.

-- 
Joel


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