質問

I have a very strange problem, which just appeared with the new builds and my cscope command to generate the db didn't change(cscope -b -q -i ). I can see the results with 'cscope -d' on the terminal, so I know the cscope.out is correct. However if I use cscope from emacs(v23.2.1) it shows me no results:

Finding symbol: find_best_path

Database directory: /workspace/project_large/
-------------------------------------------------------------------------------
cscope: no source files found

-------------------------------------------------------------------------------

Search complete.  Search time = 0.11 seconds.

And when I run 'cscope -d' from /workspace/project_large/ it gives results. I am scratching my head here. Any insight into how to find the root cause would be helpful.

役に立ちましたか?

解決

So, as always, the answer to problems like this is something silly. The reason cscope couldn't read its database is that there was a little file core.cscope.9422. The reason I didn't see it right away is that cscope.in.out is built on the build server and is part of the file that gets pulled when a tree is pulled from the repository; however the core file is not part of the repository and I didn't realize it was there until I looked at the source directory where the build ran. Moral of the story - always look the source of the problem!

他のヒント

Check that the emacs buffer in which you invoke the cscope command is in the expected directory (with M-x pwd).

Also have a look at environment variables: is cscope sensitive to entries that may be absent in an emacs started under X? (An easy way to check that without grovelling through man pages is to start an emacs from bash and see whether it suffers from the problem.)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top