[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-debug-dev] Translating cross compiled paths
|
Øyvind,
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.
-Samrobb
> -----Original Message-----
> From: Øyvind Harboe [mailto:oyvind.harboe@xxxxxxxxx]
> Sent: Wednesday, August 04, 2004 10:50 AM
> To: cdt-debug-dev@xxxxxxxxxxx
> Subject: [cdt-debug-dev] Translating cross compiled paths
>
>
> CDT encounters paths that are a result of cross compiles.
>
> One troublesome example is CygWin cross compilers under Windows.
>
> I'm experimenting with a scheme where I have defined a static
> method in
> a new class org.eclipse.cdt.core.utils.path which creates an
> instance of
> a platform specific class(much like SWT)
> org.eclipse.cdt.core.utils.path.PlatformPathGuesser, which tries to
> guess the absolute paths based upon the cribs given in e.g. .elf
> binaries.
>
> The Windows implementation will be quite convoluted(surprise!) whereas
> the Linux version could be quite simple(who in their right mind would
> cross compile from Windows to Linux :-)
>
> Attached are some sketchy changes that should communicate the gist of
> what I'm trying to do.
>
> Comments?
>
>
> This is how I create the platform specific version of
> PlatformPathGuesser.
>
>
> + PathGuesser g;
> + try {
> + g =
> (PathGuesser)Class.forName("org.eclipse.cdt.utils.path.Platfor
> mPathGuesser").newInstance();
> + } catch (Throwable e) {
> + throw new RuntimeException(e);
> + }
> + return g.guess(base, path);
>
>
>
> --
> Øyvind Harboe
> http://www.zylin.com
>
>