Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Interesting search/indexing results

Hey folks, (we are having a use fest today, so expect a lot of traffic)

  So I was spending some time trying to make the world a better place
yesterday by adding a few "convenience" extensions into the C/C++ Editor
and kind of hit a snag (or two).  These haven't been bugzilla'ed yet
since I wanted feedback on if they were in fact errors:

1) In a QNX C Project (a normal C project but with QNX extensions for
our environment) I don't get any indexing being performed. It used to
work (before we actually included the system headers) so I took a look
at the log and I saw:

ENTRY org.eclipse.cdt.core {DATE & TIME}
MESSAGE Scanner Exception: #error not configured for compiler

This is likely due to the behaviour in the QNX Neutrino header files
which does things like:

#if defined(__MWERKS__)
#include _NTO_HDR_(sys/compiler_mwerks.h)
#elif defined(__WATCOMC__)
#include _NTO_HDR_(sys/compiler_watcom.h)
#elif defined(__GNUC__)
#include _NTO_HDR_(sys/compiler_gnu.h)
#elif defined(__HIGHC__)
#include _NTO_HDR_(sys/compiler_highc.h)
#else
#error not configured for compiler
#endif

Is the exception thrown (if it is really an exception and not just a log
message), causing the indexing to stop?

because ....

2) The simple project that I have looks like:

--- file1.c ---
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv) {
	printf("Hello CDT folks \n");
	afunction(argc, argv);
	return EXIT_SUCCESS
}

--- file2.c ---
#include <stdlib.h>
#include <stdio.h>

int afunction(int argc, char **argv) {
	printf("I'm lazy so I cut and paste\n");
	return EXIT_SUCCESS
}

---

This code doesn't get indexed in the qnx project, but in the standard make
it does.  So then using the search I do a search for afunc* which returns
only the instance in file2.c, even when I specified All Occurrences.  How
come the reference to the function in main() is not returned?

3) Cacheing of the index file(s)?

Is this being done currently?  It seems to be iterating/indexing lots.  No
specifics on this just yet.

Thanks guys,
 Thomas


Back to the top