delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/04/27/13:37:20

Date: Fri, 27 Apr 2001 20:28:25 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
Message-Id: <3028-Fri27Apr2001202824+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com, pavenis AT lanet DOT lv
In-reply-to: <CAEGKOHJKAAFPKOCLHDIEENKCCAA.tim.van.holder@pandora.be>
Subject: Re: ANNOUNCE: Binutils 2.11 released
References: <CAEGKOHJKAAFPKOCLHDIEENKCCAA DOT tim DOT van DOT holder AT pandora DOT be>
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

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Fri, 27 Apr 2001 18:16:29 +0200
> 
> > > Date: Fri, 27 Apr 2001 16:34:16 +0300
> > > From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
> > > 
> > > I did find in dwarf2read.c some issue with DOSish file names, for
> > > which I'll submit a patch, but I don't think that could be a problem
> > > in this simple test case, since it didn't involve absolute file names.
> > > In order for me to DTRT in the patch, could someone please compile and
> > > link with -gdwarf-2 files whose names are in DOS-style form, like
> > > "d:/foo.c", "d:\foo\bar.c", and "d:/FOO/Bar.c", and see how do they
> > > end up in the debug info?  In particular, do the backslashes stay as
> > > backslashes, and is the file-name letter-case changed in any way?
> > 
> > Btw, "gcc -gstabs+ d:/foo/bar.c" doesn't DTRT with DOS-style absolute
> > file names: it seems to think that d:/foo/bar.c is a relative file
> > name, because it records it in its entirety in the stabs string where
> > only the basename should be recorded.  This then causes objdump to
> > become confused and display file names like d:/foo/d:/foo/bar.c; I'm
> > guessing that other programs which read the debug info, such as GDB,
> > will be confused as well.
> 
> Hmm - storing the entire path is the standard behaviour

Are you sure?  Here's what I see in the assembly of a file whose name
was passed to GCC as an absolute file name:

	    .file	"command.c"
    gcc2_compiled.:
    ___gnu_compiled_c:
    .stabs "d:/usr/djgpp/gnu/less-340/",100,0,0,Ltext0
    .stabs "d:/usr/djgpp/gnu/less-340/command.c",100,0,0,Ltext0

and here's what I see for a file whose name was simply command.c:

	    .file	"command.c"
    gcc2_compiled.:
    ___gnu_compiled_c:
    .stabs "d:/usr/djgpp/gnu/less-340/",100,0,0,Ltext0
    .stabs "command.c",100,0,0,Ltext0

To me, this looks like the first entry is the leading directory, while
the second is supposed to be the basename.

It's possible that the bug is in objdump, but Mark and myself did look
for all such potential problems in Binutils a few months ago, and I
believe they are all gone by now ;-)

> I'm pretty sure gdb has no problems with it.

Don't be so sure, I just found a potential problem (which is why I
tried to produce object files like that).  These cases are simply very
rare, so they could go unnoticed for a very long time.

> gdb already supports backslashes doesn't it?

Not inside the debug info.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019