From: Ajay J. <aj...@gm...> - 2011-01-18 10:13:31
|
Hi, Cscope for some reason does not give me information about a few functions and gives an error "No matches found for cscope query g". Now that function exists. The way I am using cscope is as follows: cscope -b -C -R -q -i cscope.files where cscope.files are the list of all c&h files in my project. Please help. Regards, Ajay. |
From: Ajay J. <aj...@gm...> - 2011-01-19 05:00:33
|
> Could you please try to explain the problem in term of actual cscope > commands, not those of some interface to it? > > And without any information about what that source actually looks like, it's > quite impossible to find out what might have gone wrong. So all I can say > for now is that you should take a thorough look at the first few paragraphs > of the "Notices" section of the cscope man page before you dig any further. Ok. I have narrowed down on the problem. This is the issue: 1 #ifdef __cplusplus 2 extern "C"{ 3 #endif 4 5 uint32_t f1() 6 { 7 a(); 8 b(); 9 c(); 10 } The cscope query under question is (using VIM) -> :cs f d f1 i.e. find all functions called by f1. If we remove the bracket in line # 2, then everything works fine. However, if the bracket exists as in line # 2, then this query yields no results. Any inputs? Ajay. |
From: Ajay J. <aj...@gm...> - 2011-01-24 08:48:07
|
> Well, that construct is not allowed in a C program, so it's not a terribly > big surprise it throws off cscope. Well .. this construct is common in C codes, when they sometimes may be used along with c++ codes or with c++ libraries. It is not a programmer's choice and he may be writing a pure C code but may have to use this. In that case, is there a workaround? |