0

I need to find function calls in my C and C++ codes. When I was looking for some suitable software, I found CScope. It looks pretty well, the only problem is, that I can't find a way how to find just function calls with it.

 0 Find this C symbol:
 1 Find this function definition:
 2 Find functions called by this function:
 3 Find functions calling this function:
 4 Find this text string:
 5 Change this text string:
 6 Find this egrep pattern:
 7 Find this file:
 8 Find files

I thought about finding all symbols (cscope -L0) and then removing definitions (cscope -L1), but it means, that codes will be parsed 2x and I'm afraid it's going to be too slow.

Is there any better, "original", way to do this with CScope?

Eenoku
  • 2,741
  • 4
  • 32
  • 64
  • 1
    What's wrong with `-L3`? – fuz Mar 23 '16 at 12:23
  • @FUZxxl I don't want to know, which functions were called by, let's say, myFunc(). I want files and line numbers were myFunc() was called itself. – Eenoku Mar 23 '16 at 12:26
  • @FUZxxl I'm sorry, I overlooked somehow :-) Please, add your response as the answer, so I can accept it. – Eenoku Mar 23 '16 at 13:18

1 Answers1

3

Use the option -L3 to ask for functions that call a specific function.

fuz
  • 88,405
  • 25
  • 200
  • 352