开发者

is there any tools that can extract all variables(both public and static) from a set of C files?

开发者_运维百科

I'm wondering if there is any tools that can extract all variables(both public and static) from a set of C files and then export all referenced variables to a text file.

Thanks in advance.


Doxygen does this pretty well (here are some examples). ctags does this too but I haven't really played with it much aside from using it in vim. I'm sure the tags file can be made parseable.


You can try CScope

More info here


Not sure this will help you but that would be easy to do with Cil from http://www.eecs.berkeley.edu/~necula/cil/index.html the problem is you will need to learn OCaml to use it. (Some people might consider that a feature.)


The Unix nm(1) on the binary may be helpful. And I used cxref about 15 years ago.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜