From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25872 invoked by alias); 9 Aug 2006 07:23:36 -0000 Received: (qmail 25862 invoked by uid 22791); 9 Aug 2006 07:23:34 -0000 X-Spam-Check-By: sourceware.org Received: from brmea-mail-4.Sun.COM (HELO brmea-mail-4.sun.com) (192.18.98.36) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Aug 2006 07:23:32 +0000 Received: from fe-amer-01.sun.com ([192.18.108.175]) by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k797NT8b011867 for ; Wed, 9 Aug 2006 01:23:30 -0600 (MDT) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0J3P00801Z4WZI00@mail-amer.sun.com> (original mail from Nikolay.Molchanov@Sun.COM) for gdb@sourceware.org; Wed, 09 Aug 2006 01:23:29 -0600 (MDT) Received: from [172.16.1.35] ([69.106.253.60]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0J3P00LO8Z74IOE4@mail-amer.sun.com>; Wed, 09 Aug 2006 01:23:29 -0600 (MDT) Date: Wed, 09 Aug 2006 07:23:00 -0000 From: Nikolay Molchanov Subject: Re: Why gdb 6.5 prints fullname in /cygdrive/... format om Windows? In-reply-to: To: Eli Zaretskii Cc: gdb@sourceware.org Reply-to: Nikolay.Molchanov@Sun.COM Message-id: <44D98D66.9060202@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <44D832EE.2040405@sun.com> <44D8E404.5050407@Sun.COM> User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00064.txt.bz2 Eli, >>Date: Tue, 08 Aug 2006 12:20:36 -0700 >>From: Nikolay Molchanov >>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. > > Yes, it prints the directory with /cygdrive/: bash-3.1$ strings -a t1-g.exe | grep t1 t1.c /cygdrive/c/users/nik/t1/ > > >>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. > > 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, and with many other compilers on Linux, Windows and Solaris. This IDE is based on Netbeans (http://netbeans.org), which is a Java application, and it is very inconvenient to translate file names from Cygwin format to Windows format in Java code. For gdb it takes a few microseconds to translate a file name. We have to spend 250-400 milliseconds to execute external binary "cygpath -m ..." and to get translated name from its output. We can try to cache the directory names, but it is not correct in general case because mount points can be changed, and there is no way to notice such change from Java application. So, if it is possible to provide an option to print fullname in Windows format, we will very much appreciate it. Thanks, Nik