From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25498 invoked by alias); 9 Aug 2006 08:41:43 -0000 Received: (qmail 25488 invoked by uid 22791); 9 Aug 2006 08:41:42 -0000 X-Spam-Check-By: sourceware.org Received: from gollum.portugalmail.pt (HELO gollum.portugalmail.pt) (195.245.179.77) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Aug 2006 08:41:40 +0000 Received: from [127.0.0.1] (195-23-225-160.net.novis.pt [195.23.225.160]) by gollum.portugalmail.pt (Postfix) with ESMTP id 27AA9102E80; Wed, 9 Aug 2006 09:39:51 +0100 (WEST) Message-ID: <44D99FBE.3070805@portugalmail.pt> Date: Wed, 09 Aug 2006 08:41:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: Nikolay.Molchanov@Sun.COM Cc: Eli Zaretskii , gdb@sourceware.org Subject: Re: Why gdb 6.5 prints fullname in /cygdrive/... format om Windows? References: <44D832EE.2040405@sun.com> <44D8E404.5050407@Sun.COM> <44D98D66.9060202@sun.com> In-Reply-To: <44D98D66.9060202@sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0632-0, 08-08-2006), Outbound message X-Antivirus-Status: Clean X-IsSubscribed: yes 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/msg00065.txt.bz2 Nikolay Molchanov wrote: > 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. > Hummm, how about?: You could avoid the external executable loading time everytime you want to convert a path, by keeping one "cygpath -m -f -" loaded, and feeding it the pathnames to stdin / getting result from stdout. Cheers, Pedro Alves