0

I need a script to get list of all functions from one particular file.
Here is similar question and response for cscope tool.

how can I display all function name from cscope database?

I've tried to do it this way, but I get all functions in a project and I am not able to assign them to right file.

Any idea how to get just all functions of a specified C file?

Community
  • 1
  • 1
Meloun
  • 13,601
  • 17
  • 64
  • 93

1 Answers1

1

You can use the -b option to cscope and just build the cross ref db the first time, and then use the mechanism in the link you specified, but don't use the -R option. Make it use the db you've already built.

find . -name foo.c > cscope.files

cscope -b
bruceg
  • 2,433
  • 1
  • 22
  • 29