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: Why gdb 6.5 prints fullname in /cygdrive/... format om Windows?


> Date: Wed, 09 Aug 2006 00:23:18 -0700
> From: Nikolay Molchanov <Nikolay.Molchanov@Sun.COM>
> Cc: gdb@sourceware.org
> 
> >One way that should work is "strings -a foo.exe".  You should see the
> >name of each of your source files (either with or without a leading
> >directory) and right after each file name the directory which was the
> >current when you compiled that file.  Please show both the file names
> >and the directories that follow them.
> >  
> >
> Yes, it prints the directory with /cygdrive/:
> 
> bash-3.1$ strings -a t1-g.exe | grep t1
> t1.c
> /cygdrive/c/users/nik/t1/

If so, there's nothing GDB can do about that: it simply outputs the
source file names as they are recorded in the debug info.

> >In general, if you want to avoid such problems, you should be using a
> >coherent set of tools.  Which in practice means that a Cygwin build
> >of GDB should be used with Cygwin front ends and other programs.  If
> >your front end cannot be built with Cygwin, you might consider using
> >the MinGW GCC and GDB instead, which are native Windows executables
> >and understand Windows-style d:/foo file names.
> >  
> >
> Yes, we will try to support these compilers as well in future, but our 
> primary
> target is to provide a free open source IDE for java and C/C++ developers,
> and this IDE shall work with Cygwin compilers on Windows

The problem is, it's generally not feasible to have Cygwin and
non-Cygwin executables work seamlessly together, and similarly for
MSYS with non-MSYS executables (and UWIN as well, I think).  More
generally, any toolkit that modifies too much the basic OS interface
in order to support Posix features beyond what's available on the
Windows APIs, will always hit this problem sooner or later.

In other words, I think the requirement to support all these compilers
in the same build of the IDE is simply infeasible.  You will probably
be better off if you arrange for your IDE to build as Cygwin and MinGW
applications, and provide both binaries for download.  Then people
could choose the proper binary according to the development tools they
use.  I don;t think there's a reason to believe that someone would
need to mix development tools of different types in the same project.

> So, if it is possible to provide an option to print fullname in
> Windows format, we will very much appreciate it.

That would mean to add code to the native MinGW port that would
understand the Cygwin /cygdrive/ feature.  Such a code will need to
change each time Cygwin changes anything substantial in how this
feature works.  I think such coupling between two unrelated projects
is not a good idea.


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