| Summary: | [Scanner Discovery] Scanner recognizes Symbols with values wrong | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | s.michel | ||||
| Component: | cdt-build | Assignee: | cdt-build-inbox <cdt-build-inbox> | ||||
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, yevshif | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
s.michel
I think it is not really clear what I mean with make targets, sorry.
The name of my build configuration matches a target in my Makefile.
In eclipse in the "make target"-view I added several targets that point to ${ConfigName} with several different defines (e.g. DEBUG_LEVEL=2). ConfigName is an eclipse variable, that contains the build configuration name.
Now I can start different configs in the eclipse "make target"-view for each build configuration.
Everything is working fine, except the above explained scanner problems.
Do you use "per project" or "per file" Discovery Profile? "Per project" won't be able to handle that by nature as it just adds up to the project list not aware where existing entries came from. You can try "per file" but I am skeptical about it as well, probably the current design does not support that either. I just tested "per file" Discovery Profile, but this also did not work. Do you have any suggestion for me? Is my setup that uncommon or do I have to configure Eclipse in a different way? The problem is, that the new value of the symbol is just added and not replaced. It is in ScannerConfigUtil.java -> function scAddSymbolsList2SymbolEntryMap. There is a call to "rc |= sEntry.add(value, active);". But when does it make sense to add the new value and keep the old one? There are 2 possible reasons I can think of. One is that for "per-project" type entries for all resources are accumulated in one storage per project. Another reason is that they are accumulated together to be displayed under "Includes" which displays all the include path entries for all resources. Created attachment 182020 [details]
cdt patch
The attached change resolves the problem for me. It sets all "old/previous" symbol values to inactive.
But I have problems to create a cdt deploy package.
Another solution could be, if the new define value is always inserted in the value list at index zero respectively moved to index zero. But I did not tested it yet. The problem is, that the editor does not know what areas to grey out if a define can have more than one value. Are there any news on this? I'm really looking forward to find a proper solution for this issue. I hope the problem is clear: If a symbol can have more than one value, than it is not clear what code regions are active and what not. We are moving toward a different approach for scanner discovery, see bug 290631. It should be easier to solve problems like this one with it. I plan to go over this and other tasks once the framework is in place, hopefully before CDT 8.0 is released. |