Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Indexer Bug or expected behaviour

Hi,
 
My product based on Eclipse 3.2 + CDT 3.1.1.
 
The Indexer (implemented 'ScannerConfigurationDiscoveryProfile' extension - changed gcc TO Mygcc) 
worked beautifully on most systems, but had problems on few.
The virtual "Includes" directory would not appear & there was no relevant message in the "Problems" view.
As a result, none of the navigation features would work.
 
NOTE: I checked the same with CDT (tried managed make C project) and saw the same problem.
 
The problem occurs in these circumstances:
- mount drive (that eclipse is installed in) as "/"
  e.g. I have e:/eclipse so I would use
         mount e: /
        (Unmount any previous existing mount: umount / )
- Launch eclipse from the bash prompt (problem doesn't occur if launched from explorer)
    [-@delicia /cygdrive/e/eclipse]cd /
    [-@delicia /]cd eclipse
    [-@delicia /eclipse]./eclipse.exe &
  I use a bash shell (bash 2.05)
- Look under the virtual Includes directory, it doesn't contain correct entries (refer to attached images).

 
Debugging the problem - org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator.translateIncludePaths()
calls realPath.toFile().exists(), which evaluates to TRUE; hence no path conversion is done and the parser doesn't identify the standard include directories.
 
I put in a Workaround/Fix: If include path (starts with "/") && (is _not_ followed by cygdrive prefix), then we conclude that the include path starts with a drive mounted on "/".
Use cygpath to get the drive corresponding to the mount point & prefix existing include path with /cygdrive/<driveLetter>).
This format is handled correctly down the line.
 
It would be good if the CDT scanner handled this case.
 
Regards,
Delicia.

Attachment: CDT_working.JPG
Description: JPEG image

Attachment: CDT_NotWorking.JPG
Description: JPEG image


Back to the top