| Summary: | [Scanner Discovery] The build output parser does not work with Mozilla preincluded files (-include) | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Jonathan Watt <jwatt> |
| Component: | cdt-build | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, jamesblackburn+eclipse, yevshif |
| Version: | 7.0.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Jonathan Watt
For example, if I have my Mozilla source code in the directory '/src', the objdir is '/src/obj', the file I'm interested in is '/src/content/svg/content/src/nsSVGSVGElement.cpp', and its object file is built at /src/obj/content/svg/content/src/nsSVGSVGElement.o, then the build output for this file is: nsSVGOuterSVGFrame.cpp g++-4.2 -o nsSVGOuterSVGFrame.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Darwin10.6.0\" -DOSARCH=Darwin -D_IMPL_NS_LAYOUT -I/src/layout/svg/base/src/../../../base -I/src/layout/svg/base/src/../../../generic -I/src/layout/svg/base/src/../../../style -I/src/layout/svg/base/src/../../../xul/base/src -I/src/layout/svg/base/src/../../../../content/svg/content/src -I/src/layout/svg/base/src/../../../../content/base/src -I/src/layout/svg/base/src -I. -I../../../../dist/include -I../../../../dist/include/nsprpub -I/src/obj/dist/include/nspr -I/src/obj/dist/include/nss -fPIC -fmessage-length=0 -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -DNO_X11 -pipe -DDEBUG -D_DEBUG -DTRACING -g -fmessage-length=0 -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -MD -MF .deps/nsSVGOuterSVGFrame.pp /src/layout/svg/base/src/nsSVGOuterSVGFrame.cpp The |-include ../../../../mozilla-config.h| part is what's failing to be handled. Changing it to |-include /src/obj/mozilla-config.h| to get rid of the relative path stuff does not help. I believe this functionality was working in earlier CDT but got lost with the massive changes done to MBS for 4.0. -incldue is known to work... So there may be two bugs here: 1) Scanner discovery detection of -include 2) Indexer parsing a provided -include (In reply to comment #4) > -incldue is known to work... So there may be two bugs here: > 1) Scanner discovery detection of -include > 2) Indexer parsing a provided -include Or 3) the data from the scanner discovery does not make it from there to the indexer. (I have trouble making this work with the PerFileScannerDiscovery, it looks like the individual settings per file are merged into a common configuration that is then used for all files??). In any way, this is relatively easy to check: The result of the discovery is written to a file in '<workspace>/.metadata/.plugins/org.eclipse.cdt.make.core'. What's being passed to the indexer can be seen via a parser log (context menu of file in project explorer - Index - Create Parser Log). For me, that log has nothing listed under the "Preincluded files (option -include):" section, as mentioned in comment 0. As for the result of the discovery being written to a file in '<workspace>/.metadata/.plugins/org.eclipse.cdt.make.core', there is a 4 MB .sc file containing XML in that directory with the preinclude file mentioned at various places. Unfortunately the preinclude file is prefixed with a variety of paths, none of which are correct. Is it possible that if the path doesn't exist that Eclipse just throws away that preinclude, and that's why nothing shows up (with or without correct paths)? |