Date: Sat, 06 Jan 2001 11:15:36 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <9003-Sat06Jan2001111535+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 Subject: Backslashes in debug info Reply-To: djgpp-workers AT delorie DOT com 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.