Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] headless Eclipse

Hi all,

 

We are trying to use Codan interface to run Eclipse in the headless (no GUI) mode to run checkers and having some problems.

The symptom we see is as follows. We have some external libraries for which we include some files. We can see that the indexer sees symbols from the includes, but IASTName.resolveBinding fails to resolve bindings that include symbols from those includes. Here is an example. We have a class (A) that derives from another class (sc_module) that is part of the external library (systemc.h). There’s a constructor in A that takes an argument of type “sc_module_name” defined in the base class “sc_module”. When we try to resolve the constructor binding using index, e.g. ctorBind = index.findBinding(indexNameOfCtor), it will find the right binding: A(sc_core::sc_module_name). After that if I try to find this binding using AST, then it fails. I do something like this: ast.getDefinitionsInAST(ctorBind), it returns null. The “ast” was created from index using the flag AST_SKIP_INDEXED_HEADERS. When debugging the getDefinitionsInAST function, I can see how the binding it found was A(?) (as opposed to the correct one - A(sc_core::sc_module_name)) and more digging showed that it couldn’t resolve either sc_module_name or sc_module.

So I assumed that AST should use index for such cases, but something is not working although the index knows about the symbols in the external library. Any suggestions where to look for hints?

 

Thanks,

Andrey


Back to the top