From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12985 invoked by alias); 8 Aug 2006 19:24:08 -0000 Received: (qmail 12977 invoked by uid 22791); 8 Aug 2006 19:24:08 -0000 X-Spam-Check-By: sourceware.org Received: from nwkea-pix-1.sun.com (HELO nwkea-pix-1.sun.com) (192.18.42.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Aug 2006 19:24:05 +0000 Received: from d1-sfbay-04.sun.com ([192.18.39.114]) by nwkea-pix-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k78JO3Ia006782 for ; Tue, 8 Aug 2006 12:24:03 -0700 (PDT) Received: from conversion-daemon.d1-sfbay-04.sun.com by d1-sfbay-04.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0J3P00A01169E300@d1-sfbay-04.sun.com> (original mail from Nikolay.Molchanov@Sun.COM) for gdb@sourceware.org; Tue, 08 Aug 2006 12:24:03 -0700 (PDT) Received: from Sun.COM ([129.146.186.185]) by d1-sfbay-04.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0J3P007N81W2CD30@d1-sfbay-04.sun.com> for gdb@sourceware.org; Tue, 08 Aug 2006 12:24:03 -0700 (PDT) Date: Tue, 08 Aug 2006 19:24:00 -0000 From: Nikolay Molchanov Subject: Re: Why gdb 6.5 prints fullname in /cygdrive/... format on Windows? In-reply-to: <20060808173625.GG1385@adacore.com> To: gdb@sourceware.org Message-id: <44D8E4C2.8080500@Sun.COM> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <44D832EE.2040405@sun.com> <17624.26822.63634.129976@kahikatea.snap.net.nz> <20060808131823.GB16362@nevyn.them.org> <20060808152923.GA23703@trixie.casa.cgf.cx> <20060808173127.GA27456@brasko.net> <20060808173625.GG1385@adacore.com> User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 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/msg00055.txt.bz2 Joel Brobecker wrote On 08/08/06 10:36,: >>However, front ends that compile natively to windows but are using >>cygwin's GDB will have trouble with this. Is the intention to exclude >>those front ends from understanding this information? >> >> > >I think that you'll need to add a special case in your front-end >to handle that. Even though GPS is not using cygwin, it does handle >cygwin paths without any problem. > > Yes, Bob is absolutely right, we have a Java IDE (based on Netbeans), which is a front end, and it is not easy to translate filenames from Cygwin format to Windows format. We have to translate them because Java does not understand Cygwin format. It is easy to translate "/cygdrive/c/..." to "c:/...", but it is not easy to translate "/tmp/..." or "/usr/include/..." or any other mounted filesystem path. Is it possible to add a gdb command or setting to print full name in Windows format? Thanks in advance, Nikolay Molchanov P.S.: I'm sorry for incorrect gdb 6.4 output in my original mail. Here is more accurate information. Previously we used gdb 6.3-50, and it did not print fullname: $ gdb-6.3.50.exe --nw --interpreter=mi ~"GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)\n" ~"Copyright 2004 Free Software Foundation, Inc.\n" ~"GDB is free software, covered by the GNU General Public License, and you are\n" ~"welcome to change it and/or distribute copies of it under certain conditions.\n" ~"Type \"show copying\" to see the conditions.\n" ~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n" ~"This GDB was configured as \"i686-pc-cygwin\"." ~"\n" (gdb) -file-exec-and-symbols args.exe ^done (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0040106b",func="main",file="src/args.c",line="9",times="0"} (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x0040106b",func="main",args=[{name="argc",value="1"},{name="argv",value="0x4412b98"}],file="src/args.c",line="9"} (gdb) -stack-list-frames ^done,stack=[frame={level="0",addr="0x0040106b",func="main",file="src/args.c",line="9"}] (gdb) -------------------------------------------------------------------------------------------- Now we are trying to use gdb 6.5, which prints fullname (which is great!), but it is printed in Cygwin format: $ gdb --nw --interpreter=mi ~"GNU gdb 6.5.50.20060706-cvs (cygwin-special)\n" ~"Copyright (C) 2006 Free Software Foundation, Inc.\n" ~"GDB is free software, covered by the GNU General Public License, and you are\n" ~"welcome to change it and/or distribute copies of it under certain conditions.\n" ~"Type \"show copying\" to see the conditions.\n" ~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n" ~"This GDB was configured as \"i686-pc-cygwin\"." ~"\n" (gdb) -file-exec-and-symbols args.exe ^done (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0040106b",func="main",file="src/args.c",fullname="/cygdrive/c/tmp/nikm/tmp_Projects/Args2/src/args.c",line="9",times="0"} (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x0040106b",func="main",args=[{name="argc",value="1"},{name="argv",value="0x4412b80"}],file="src/args.c",fullname="/cygdrive/c/tmp/nikm/tmp_Projects/Args2/src/args.c",line="9"} (gdb) -stack-list-frames ^done,stack=[frame={level="0",addr="0x0040106b",func="main",file="src/args.c",fullname="/cygdrive/c/tmp/nikm/tmp_Projects/Args2/src/args.c",line="9"}] (gdb)