Mail Archives: djgpp-workers/2001/01/06/04:18:27
I think I've found a bug in GCC: it doesn't support backslashes in
file names when generating debug info.
To reproduce, compile any program like this:
gcc -gstabs+ d:\foo\bar\baz\foo.c -o foo
and then look at the debug info with objdump:
objdump -g foo | less
You will see that all the "file" entries are written thusly:
d:/foo/bar/baz/d:\foo\bar\baz\foo.c
This isn't specific to stabs, -gcoff does similar things, except that
there are only 14 characters for the file name there, so the above
long name is truncated.
I tried this with GCC 2.95.2 and two versions of ld.exe: 2.10 and
2.9.1. The linker version didn't have any effect on this, so I think
the problem is in GCC. GCC 2.7.2.1 doesn't have this problem (tested
with COFF debugging only, since 2.7.2.1 didn't support stabs).
I think this is a serious problem: at least with COFF debugging, it
prevents GDB from displaying the source.
- Raw text -