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 on Windows?


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)


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