Why gdb 6.5 prints fullname in /cygdrive/... format om Windows?

Eli Zaretskii eliz@gnu.org
Tue Aug 8 21:31:00 GMT 2006


> Date: Tue, 08 Aug 2006 12:20:36 -0700
> From: Nikolay Molchanov <Nikolay.Molchanov@Sun.COM>
> Cc: gdb@sourceware.org
> 
> Eli, the executable is built by Cygwin gcc,, but I don't know how to
> find out the file name and the compilation directory actually recorded
> in the debug info of the executable. Which command prints this info?

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.

> And the main problem with file names in Cygwin format is that Java
> does not understand such names, so we have to translate them to
> Windows format, which is not a trivial task in general case, because
> there could be many mounted filesystems, like "/tmp/...",
> "/usr/include/..."
> and so on.

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.



More information about the Gdb mailing list