Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use vim+cscope. Since a struct or a function can be declared many times, when I want to find how it is defined, I'm troubled by a long list of declarations.
I use 'cscope f g [def]', and I don't know why declarations are listed.
So how can I configure cscope so that declarations won't be listed? Thanks.
So I think it'd be better if you can control macros/declarations/definitions for variables/functions separately. Is there any way to achieve this goal?
...
Find all function definitions: task_struct
...
I'm not quite clear what you mean by that. I don't see the "Find all function definitions:" option. I tried both command line cscope and cscope in Vim. Neither works...
Looks like we're on different versions .. I'm on Fedora 13 with cscope version 15.7a, what's yours ?
Arch with version 15.7a. Available options are:
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find all function definitions:
Find all symbol assignments:
Try removing the cscope.out file, I think '-u' will unconditionally rebuild it as well
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find all function definitions:
Find all symbol assignments:
Try removing the cscope.out file, I think '-u' will unconditionally rebuild it as well
But will it depend on versions? I just want to control macros/declarations/definitions for variables/functions separately. Does cscope implement this, or can you make it done in your version?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.