From: pavenis AT lanet DOT lv To: "Eli Zaretskii" , djgpp-workers AT delorie DOT com Date: Sat, 6 Jan 2001 21:10:29 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Backslashes in debug info Message-ID: <3A5789C5.9129.CDA41C@localhost> In-reply-to: <9003-Sat06Jan2001111535+0200-eliz@is.elta.co.il> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Seems that the problem is with GAS not GCC. GAS doesn't seem to recognize DOS style absolute file name as such and makes this mess. (Anyway I saw this with -gstabs+ only). Try browsing assembler output to verify this. Also I see one place in GCC-2.95.3 test version where DIR_SEPARATOR_2 is not tested in gcc/toplev.c [output_file_directive()]. But it's fixed in current CVS version of gcc-2.97 ... Andris On 6 Jan 2001, at 11:15, Eli Zaretskii wrote: > 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.