Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Path and Symbol Discovery from ClearCase config records

Hi all,

I'm, currently trying to obtain the paths and symbols for makefile projects from clearcase config records instead of the build console output.
There is a problem I run into, and I would appreciate any kind of advice.

Here is what I do:

- I wrote an IResourceChangeListener that watches out for object files

- The found object files are passed to a workspace job, doing the following:
  - obtain the clearcase config records of each object file
  - determine the include paths and preprocessor symbols from the config records
  - Store the found paths and symbols in the DiscoveryManager (as it is done in PerProjectSICollector does).
  - run the ScannerConfigBuilder

- Since C and C++ are mixed in my projects, are created extensions of org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile, one for C and one for C++ denoting the specs file explicitly (The default GCCStandardMakePerFileProfile has a bug - both C and C++ end up with the same built-in symbols and paths). Furthermore, reading the build output is omitted.

         name="C ClearCase Config Records Per Project"
      <scannerInfoProvider providerId="specsFile">
               arguments="-E -P -v -dD ${plugin_state_location}/specs.c"
         <scannerInfoConsoleParser class="org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCSpecsConsoleParser"/>

The one for C++ is analogous.

- I defined my own tools chain just subclassing the gnu linux tools chains, Such that the profiles above are selected automatically when creating the projects.

I actually works pretty good. Just, sometimes after closing and opening the the workbench, the discovered symbols and paths are not read back from the scanner configuration file stored in the .metadata/.plugins/org.eclipse.cdt.make.core/<project>.sc. The properties dialog does not show any path or symbol anymore, and the next build then clear the scanner config file in the workspace and rewrites it, such that only the compiler built-ins are available any longer.

Here my question(s):
- Is the DiscoveryManager meant to be used for this purpose? I cannot use the C project description, since the .cproject files are checked in into revision control once the projects are created.

- The problem seems to occur after I imported the project, then close the workbench and open it later. Where can a look for the code that should read the scanner config file from the workspace in order to debug it?\

- Are there any known bugs in this area (DiscoveryManager, Makefile projects)?

- Are there any events that completely clear the discovered info? In this case, the ResourceChangeListener does cannot work either.

Thanks for any kind of advice; the feature is too valuable for us to be dropped.


Back to the top