Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Tracking down indexing problems
Tracking down indexing problems [message #205090] Sat, 17 November 2007 06:36 Go to next message
Scott Gifford is currently offline Scott GiffordFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,

I'm trying to track down the indexing problems in my Eclipse C++
project.

I have enabled syntax highlighting for indexing errors, so I can see
what CDT's indexer is having problem with. I have enabled logging, to
try and get more details about the problems.

Still, the information I get isn't enough to actually debug the
problem. For example, I have this test case. It works fine in a
small test project, but in my current project it fails.

#include <signal.h>

static void ignore_sig(int sig) {
}

void sigtest() {
struct sigaction sa;
sigset_t sa_ss;
sa.sa_handler = ignore_sig;
sigemptyset(&sa_ss);
sa.sa_mask = sa_ss;
sa.sa_flags = 0;
sa.sa_restorer = 0;
sigaction(SIGUSR1, &sa, 0);
}

In my project, all of the fields in "sa" appear in red, and generally
act like the indexer doesn't understand them.

I see this in the logs:

Indexer: parsing /lx-server/geserver/getest.cpp
Indexer: unresolved include at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 1
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 9; A scope could not be created to represent the name sa_handler
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 10; Attempt to use symbol failed : sigemptyset
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 11; A scope could not be created to represent the name sa_mask
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 12; A scope could not be created to represent the name sa_flags
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 13; A scope could not be created to represent the name sa_restorer
Indexer: problem at /home/sgifford/locomatix-workspace/lx-server/geserver/getest .cpp: 14; Attempt to use symbol failed : SIGUSR1
Indexer: adding file:/home/sgifford/locomatix-workspace/lx-server/geserver/g etest.cpp

but I'm not sure where to go from here. signal.h is in /usr/include,
and the code compiles and runs, so things must be basically right. I
tried changing <signal.h> to "/usr/include/signal.h" and then the
"unresolved include" error goes away, but the other errors remain and
the index still doesn't work.

Any suggestions for my next step in debugging this?

Thanks!

---Scott.
Re: Tracking down indexing problems [message #205368 is a reply to message #205090] Thu, 22 November 2007 14:27 Go to previous message
Anton Leherbauer is currently offline Anton LeherbauerFriend
Messages: 490
Registered: July 2009
Senior Member
Scott Gifford wrote:
> and the code compiles and runs, so things must be basically right. I
> tried changing <signal.h> to "/usr/include/signal.h" and then the
> "unresolved include" error goes away, but the other errors remain and
> the index still doesn't work.

Seems like you need to manually configure the include search path used
by the parser/indexer in the project properties: C/C++ General > Paths
and symbols.

--
Anton Leherbauer
Wind River CDT Team, Austria
Previous Topic:Where are these editor settings located?
Next Topic:Code completion for standard C++ Libraries not working
Goto Forum:
  


Current Time: Wed Jan 15 08:48:38 GMT 2025

Powered by FUDForum. Page generated in 0.02954 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top