Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Translating cross compiled paths

> 
> >   There is already some code in CDT that makes use of
> > the Cygwin 'cygpath' utility to translate to/from POSIX
> > paths where needed.  You may want to examine where this
> > is currently used, and see if you can generalize the
> > usage patterns.  I've been meaning to do something
> > similar, but haven't had the time to make a serious
> > effort about it.
> 
> Sigh, please ignore the comment on cygpath... I somehow
> failed to notice your attachment, and of course, you are
> indeed using cygpath.
> 
> Looking at your implementation, I'm trying to understand
> what/when you would want to use this class.  It looks as
> if you are assuming a path relative to an existing windows
> directory, and falling back to calling cygpath if that
> fails.  I would think that you'd at least want to reverse
> the order (try cygpath, then fall back to assuming a
> relative directory).
> 
> A better solution would probably be to understand that
> the build platform is Cygwin, and therefore, Cygwin type
> paths should be passed to tools.
> 
> Another concern would be handling of Cygwin mount points.
> This can be a problem in some instances.  I'm not sure if
> you run afoul of that, as you're only translating paths
> in one direction, but it's something to be aware of.
> 
> There are a couple of other potential problems (more recent
> versions of cygpath can handle multiple paths at once, the
> cygdrive prefix can be altered by the user, properly escaping
> spaces, etc.)  There are a lot of little things that make the
> problem of path translation under Cygwin more complicated
> than you'd want it to be :-/
> 

Agreed.

I(we) am(are) very reluctant to some of the patch from Oyvind in
this area, for example, the one dealing with the ErroParserManager.

This is even a problem with the Spawner class, to interrupt/suspend a process
(Cygwin seems to have its own way of dealing with interruption)

So far I have no concrete/general solution when dealing with cygwin or
the case insenstive of the file system or .... etc .. etc..





Back to the top