【发布时间】:2016-03-23 12:22:28
【问题描述】:
我需要在我的 C 和 C++ 代码中找到函数调用。当我在寻找一些合适的软件时,我找到了 CScope。它看起来很不错,唯一的问题是,我无法找到一种方法来查找函数调用。
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
我考虑过查找所有符号 (cscope -L0),然后删除定义 (cscope -L1),但这意味着代码将被解析 2 倍,我担心它会太慢。
有没有更好的“原始”方法来使用 CScope 做到这一点?
【问题讨论】:
-
-L3有什么问题? -
@FUZxxl 我不想知道,比如说 myFunc() 调用了哪些函数。我希望文件和行号是 myFunc() 自己调用的。
-
@FUZxxl 对不起,我忽略了 :-) 请添加您的回复作为答案,以便我接受。