bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/2582] dwarf2dbg.c embeds absolute filename path with hard-coded


From: burgess at impulse dot net
Subject: [Bug gas/2582] dwarf2dbg.c embeds absolute filename path with hard-coded / separator
Date: 25 Apr 2006 18:39:57 -0000

------- Additional Comments From burgess at impulse dot net  2006-04-25 18:39 
-------
> > dwarf2dbg.c -- line 1476 of CVS version 1.81:
> > 
> > p[len] = '/';
> > 
> > This inserts a filesystem separator character...in the DWARF2 debugging 
> > information
> > that looks like C:\Workspaces\Eclipse\Blinky/init.s
> 
> One thing I am particularly worried about is the heuristic I am using to 
> decide when to use the \ directory separator.  At the moment it looks 
> for paths starting with a drive letter eg C:.  Are there situations 
> where there can be paths without this drive letter which still need the 
> backslash separator ?

I asked a Windows programmer (I'm not) and he wasn't sure what Windows does 
when it runs out of 
single-char drive letters -- does it go to AA:\, BB:\ etc.  He didn't indicate 
that you would ever find an 
absolute Windows path that didn't start with <drive letter>:\ -- so my bet is 
that your patch -- 
checking if the second character in the absolute filename path is a colon -- 
will work OK 99.9999% of 
the time.  If you wanted to be really hardcore you could check if the character 
immediately after the 
colon is '\' but I don't think that's necessary and it won't help if Windows 
suddenly uses multi-character 
drive letters.

My dev system is down right now but when it's back up I'll check functionality. 
 Thanks for the patch!

--Bill

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2582

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]