dotgnu-pnet
[Top][All Lists]
Advanced

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

[Pnet-developers] [bug #20170] Paths in debug info are borked when build


From: Radek Polak
Subject: [Pnet-developers] [bug #20170] Paths in debug info are borked when build with csant under cygwin
Date: Thu, 14 Jun 2007 04:43:41 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

URL:
  <http://savannah.gnu.org/bugs/?20170>

                 Summary: Paths in debug info are borked when build with
csant under cygwin
                 Project: DotGNU Portable.NET
            Submitted by: radekp
            Submitted on: Thursday 06/14/2007 at 04:43
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thursday 06/14/2007 at 04:43  Name: csant_cygwin.tar.gz  Size: 1kB  
By: radekp

<http://savannah.gnu.org/bugs/download.php?file_id=13044>
-------------------------------------------------------
Date: Thursday 06/14/2007 at 04:43  Name: csant_cygwin.patch  Size: 585B  
By: radekp

<http://savannah.gnu.org/bugs/download.php?file_id=13045>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?20170>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

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