bugDotGNU Portable.NET - Bugs: bug #20170, Paths in debug info are borked...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #20170: Paths in debug info are borked when build with csant under cygwin

Submitter:  Radek Polak <radekp>
Submitted:  Thu 14 Jun 2007 04:43:40 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Wed 19 Sep 2007 08:16:41 AM UTC, comment #1: 

Thanks to Klaus, it's now ok.

Radek Polak <radekp>
Group Member
Thu 14 Jun 2007 04:43:40 AM UTC, original submission:  

Hi,
this is already known problem and i have feeling that it needs to be documented.

For reproducing this bug you need cygwin and pnet build with --disable-cygwin.

Try building attached sample under cygwin. You'll get following output:

$ make
csant
Building project `ConsoleApp2'
Building target `all' for project `ConsoleApp2'
cscc -o .\ConsoleApp2.exe -g -DDEBUG -DTRACE .\subdir\ConsoleApp2.cs -L. -lSyste
m.Xml -L. -lSystem -L. -lmscorlib
Leaving target `all' for project `ConsoleApp2'
Ending project `ConsoleApp2'

Until now everything seems ok. But now open the resulting binary in some hex editor. Search for string ".\subdir\ConsoleApp2.cs" - it should be in the debug section (after ILDB string). But it's not there! Instead there is string ".subdirConsoleApp2.cs".

What's wrong? I am not sure. It looks like cygwin does not like backslashes and paths in windows style. It's simple to try:

$ cat .\subdir\ConsoleApp2.cs
cat: .subdirConsoleApp2.cs: No such file or directory

The path passed to cat command is clobbered exactly the same way as paths in debug info.

What can we do?

We can investigate what's going on in cygwin and why are windows style paths clobbered. We can write patch for cygwin, but more likely we will find out that it's not bug but "by design" feature. Perhaps it's only problem of bash. Anyway digging into this is imho wasted time.

Solution 1 is is attached one liner patch. It makes csant use always normal slashes instead of backslashes. Cygwin is happy and windows understand normal slashes without problems too. Another good thing is that the paths in debug info will look the same when compiled on linux and on windows.

Another option would be to make csant quote paths as stated here:
http://publib.boulder.ibm.com/infocenter/tivihelp/v16r1/index.jsp?topic=/com.ibm.tivoli.tpm.wkf.doc/workflows/twkf_cygcommands.html

I prefer the first solution. I could have commited myself, but i need to know that everybody agrees with it.

Any comments are welcome.

Radek

Radek Polak <radekp>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #13044:  csant_cygwin.tar.gz added by radekp (1KiB - application/x-gzip)
file #13045:  csant_cygwin.patch added by radekp (585B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by radekp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-09-19 radekp StatusNone Fixed
        Open/ClosedOpen Closed
    2007-06-14 radekp Attached File- Added csant_cygwin.tar.gz, #13044
        Attached File- Added csant_cygwin.patch, #13045

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code