Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
cygdriveprefix can interfere with debugging
crc1021:
Under cygwin it is done with the mount command (mount c:\\home /home), under msys it is done with fstab entries (as mentioned already). I do that to bring a common root to all systems. The normal "root" for cygwin is "c:\cygwin" and for msys it is "c:\msys\1.0". My work usually is in only a couple places like "c:\home" or "c:\prj" or something like that. When I mount those into the root of cygwin or msys, the a path like "/prj/foo/code" and "/home/joe/.ssh" work in all environments.
Yes, if a path like "c:\Documents and Settings\joe\Local Settings" is mounted as "/home/joe", and "/home/joe/code" shows up in the file being debugged, then there is really no good way to get the full windows path.
However, if a path starts with "/" or "\", then it is probably a safe bet that it is absolute.
MortenMacFly:
--- Quote from: thomas on December 12, 2007, 07:15:44 pm ---How: fstab, just like under Unix.
--- End quote ---
That's bad. I know fstab but I wouldn't want to parse the fstab file out of a debugger session just to get the full path. :-(
Or what do you (Thomas) think about that?!
--- Quote from: crc1021 on December 13, 2007, 01:28:40 am ---However, if a path starts with "/" or "\", then it is probably a safe bet that it is absolute.
--- End quote ---
This part I don't get. You say hat the path can be something like /home/homer_j/src which points to C:/whatever/home/homer_j/src So why would it be safe to assume that it's an absolute path? Because it fact it is not...?!
thomas:
--- Quote from: MortenMacFly on December 13, 2007, 09:47:15 am ---That's bad. I know fstab but I wouldn't want to parse the fstab file out of a debugger session just to get the full path. :-(
--- End quote ---
I wouldn't either, this is beyond our scope. We are writing a user level program, not an operating system. fstab is not our business.
In that case, it's just bad luck, I'd say. Sad as it is, but we can't make it work everywhere under all configurations. It is already quite tough as it is now, and enough things don't work properly already, having to deal with normal filesystem paths using two different path separators and different quotation rules, UNC paths, Windows Unicode paths (which of course are "special" too), the "standard" Cygwin and MSYS paths, and whatever.
At some point, and mount points are such a point, you have to say "sorry, we tried, but...".
crc1021:
--- Quote ---This part I don't get. You say hat the path can be something like /home/homer_j/src which points to C:/whatever/home/homer_j/src So why would it be safe to assume that it's an absolute path? Because it fact it is not...?!
--- End quote ---
It is neither safe or unsafe, I just thought it would be the best guess at translation. The worst that could happen is what it does now which is not display the file.
For the record, I was not saying c::b should even try to parse fstab or (cygwin mounts), that seems to extreme to me also.
Navigation
[0] Message Index
[*] Previous page
Go to full version