Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Indexer/ C/C++ Code Analysis is taking into account sources excluded from build

Hello,

I spent some time today debugging to find the root cause of that issue.

I found out that the PDOM contains the wrong path, because the path entries in the Properties->C/C++ Build-> Settings-> Compiler/Assembler are not taken into account. The fIncludeSearchPath inside the CPreprocessor is empty, even if my configuration contains 2 path entries.
This is because the new LanguageSettingsScannerInfoProvider (function convertToLocation) doesn't provide the path, even if they are correctly displayed in the properties dialog.

The convertToLocation function uses ACPathEntry:isResolved, which returns FALSE for my source files. I guess it means that the path couldn't be resolved!? The input for the function contains the path entries, but the flag RESOLVED is not set for my resources. I saw that this flag should be set in the constructor of ACPathEntry. I put a breakpoint there but it seems to be never called, even if I close/open the project, add a new file or restart Eclipse.

If one of you could tell me where and under which conditions this RESOVLED flag is suposed to be set to true, I could do some futher investigations.

Thanks for your support!

Sebastian



Gesendet: Montag, 09. Juli 2012 um 16:41 Uhr
Von: "Andrew Gvozdev" <angvoz.dev@xxxxxxxxx>
An: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Betreff: Re: [cdt-dev] Indexer/ C/C++ Code Analysis is taking into account sources excluded from build
Hi Sebastian,
Yes, you should open a bug on this, even if it might not be fixed immediately. My guess that should be against indexer. Just check whether there isn't already one in bugzilla.

Thanks,
Andrew

On Mon, Jul 9, 2012 at 10:27 AM, Sebastian Wagner <se.wagner@xxxxxx> wrote:
Hello,

there was no reply up to now.. has anyone who is a bit more familiar with the parser and source management have had a look at the example project? I would like to know if I should open a bug on this?
I don't have to much experiences with Eclipse or Jave, but let me know if I can give you some support. Which components have been changed and what would be the starting point to investigate?

Thanks for your feedback.

Sebastian


Gesendet: Dienstag, 03. Juli 2012 um 17:43 Uhr
Von: "Sebastian Wagner" <se.wagner@xxxxxx>

An: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Betreff: Re: [cdt-dev] Indexer/ C/C++ Code Analysis is taking into account sources excluded from build
Hello,

have now some more details for you and I found a very simply example to reproduce. I attached a very small gcc project which shows an undefined symbol when I run the code analysis. I tested the example alsow ith 8.0.2, but this seems to work fine.

There are 2 configuration files in the folders VM4-2BR and VM4-DD-MS. The active file contains a definition of a symbol AIH_u8VOLT_SENS_ERR_FILTER_TM used in the c file. The excluded file is empty. Nevertheless the indexer seems to include the excluded file. If you select the #include "..." and goto "Declaration" it opens the excluded file. This causes the error of the undefined symbol.

The attached project is based on the standard GCC project to make sure that the issue is not related to my own plugin. Could someone have a look on it, to make sure if it is a bug or not?


Thanks,

Sebastian
Gesendet: Dienstag, 03. Juli 2012 um 16:59 Uhr
Von: "Richard Horbach" <richard.horbach@xxxxxxxxxx>
An: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Betreff: Re: [cdt-dev] Indexer/ C/C++ Code Analysis is taking into account sources excluded from build
Hi,

I just wanted to note that I noticed something similar when using CDT 8.0. I have opened bugzilla  373767 a while ago for the issue.

Regards,
Richard

On 7/3/2012 2:53 PM, Sebastian Wagner wrote:
Hello,

I'm currently migrating my plugin to the latestn release of eclipse/cdt 8.1.

I re-created a test C project completely, because I had some Java errors when I just used the imported project.

When I run the C/C++ Code Analysis I always get some errors of "underfined symbols" even if those symbols were correctly defined.

I found out that this seems to be related to some files which were excluded from the project. There are some files which are redundant in my project (identical filename). Depending on the configuration, the one or the other file is included. I used the "Exclude from Build" for this. I  In CDT 8.0 this worked fine and only the files used for the selected configuration were taken into account, but in 8.1 the excluded files seem to have an impact on the Indexer/ Source Code Analyzer. As soon as I delete the excluded files completely, the source code analysis works fine.

I don't know if this is a bug or simply something missing in my Plugin or configuration. I'm using the language extension point, but I simply extended the GCCLanguage and added the scanner and parser configuration.

Unfortunately it's wasn't possible to reproduce it in a simple example. Maybe you coud give me an idea what could be the reason for that behavior.

Thanks,

Sebastian
  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/
_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev



  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/


  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev




  

Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für iPhone und Android.   
https://produkte.web.de/freemail_mobile_startseite/

Back to the top