Code Analysis tool for legacy C/C++
looking for a code analysis tool for some lega开发者_C百科cy c/c++ code on unix specifically to identify dependencies to
- specific functions
- specific (include?) files
- File/Socket I/O calls etc.
- function dependency tree from a root etc.
Doxygen
is probably what you're looking for. It can provide cross-reference, call graphs and dependency trees without programmer's markups, that seems to be what you need.
There is CodeViz: A CallGraph Visualizer. It uses GraphViz to generate nice big graphics.
I have used successfully Understand in the past. It's not free but it comes with a trial period so you could make an opinion about it.
You can use the LLVM infrastructure for some code analysis (e.g., building dependency graphs, searching for certain patterns, etc.), alongside with Clang or llvm-gcc.
As far as function trees, etc. doxygen
comes to mind. See Ben Voigt's comment below.
If you're just trying to generally debug, in Linux gdb
and valgrind
are invaluable for figuring out what's going on at a low level. In Windows Visual Studio
offers a lot of similar debugging functionality.
Your question is a bit vague. Can you tell us a bit more about the code and your assignment?
精彩评论