Skip to main content

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

> -----Original Message-----
> From: John Camelon [mailto:jcamelon@xxxxxxxxxx]
> Sent: October 10, 2003 3:09 PM
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] Interesting search/indexing results
> 
> 
> This is why we need a target model post-1.2, because 
> otherwise the user 
> shall get heavily involved in 
> concepts that should be kept hidden to them. 
> 
> The scanner handles preprocessor errors the way a 
> preprocessor would. This 
> could change once we 
> implement a full IProblem error handling strategy.  The 
> rationale is that 
> if we were not able to include something
> or our macros are set improperly, we will encounter so many 
> errors down 
> the road that the parse very well
> could end up useless. 

Fair enough ... the explanation makes perfect sense.  For
now (until we have a target model hashed out) we can certainly
provide the appropriate defines in the "QNX" world so that 
it works fairly reliably (ie without defining a million commands =;-)

Thanks,
 Thomas

> cdt-dev-admin@xxxxxxxxxxx wrote on 10/10/2003 08:40:43 AM:
> 
> > Hi Thomas,
> > Some people have taken a longer long weekend, so its a little quiet 
> here. 
> > But I can answer your first question.
> > Yes, a ScannerException is thrown because of the #error, 
> and yes it will 
> 
> > stop the parse for that compilation unit which will cause 
> that file to 
> not 
> > be completely indexed.
> > 
> > To get this to work you will need to add one of the 
> compiler symbols ( 
> > __MWERKS__,  __GNUC__, etc) to the symbols section of the build 
> settings. 
> > And also the path the those include files.  I'm assuming 
> that _NTO_HDR_ 
> is 
> > defined somewhere.
> > 
> > -Andrew
> > 
> > 
> > 
> > Thomas Fletcher <ThomasF@xxxxxxx> 
> > Sent by: cdt-dev-admin@xxxxxxxxxxx
> > 10/10/2003 08:43 AM
> > Please respond to
> > cdt-dev@xxxxxxxxxxx
> > 
> > 
> > To
> > "'cdt-dev@xxxxxxxxxxx'" <cdt-dev@xxxxxxxxxxx>
> > cc
> > 
> > Subject
> > [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
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/cdt-dev
> > 
> > 
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev
> 


Back to the top