Reputation: 115
Is there any way cscope can be used in script to find global definitions? I am looking for options where I can validate the sizes of structures used while memory allocation. Instead of writing a program to find the definition on my own, I intend to use cscope to find the definition of the structure. Later I can parse through the definition and calculate the size of the structure. Thanks in advance.
Upvotes: 2
Views: 964
Reputation: 115
Got this solution:
cscope -d -L1<symbol>
-L option does a single search with line-oriented output when used with the -num pattern option. num is the menu option starting from 0. So '1' stands for global definition menu option -d options means not to build index again.
Upvotes: 2
Reputation: 5167
How to find struct member uses with cscope and ignore local variables?
https://groups.google.com/forum/#!topic/vim_use/FE8DRbDtNb8
Does this helps
Thanks & Regards,
Alok Thaker
Upvotes: 0