Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a large 95% C, 5% C++ Win32 code base that I am trying to grok.
What modern tools are available for generating call-graph diagrams for C or C++ projects?
Have you tried doxygen and codeviz ?
Doxygen is normally used as a documentation tool, but it can generate call graphs for you with the CALL_GRAPH/CALLER_GRAPH options turned on.
Wikipedia lists a bunch of other options that you can try.
Have you tried SourceInsight's call graph feature?
http://www.sourceinsight.com/docs35/ae1144092.htm
Good old cflow works fine for C. See here for an implementation.
Any decent static analysis tool should have this functionality (as well as all the other stuff that such tools do). Wikipedia has a good list of such tools.
Another group of tools that may be worth checking out are coverage tools. The call graph generated by the coverage tool will contain only the calls that actually take place during a run of the program. Initially this may be more helpful to you than a full call graph. I'm unable to make any suggestions on this for Windows, but for linux projects I highly recommend gcov and lcov.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am porting an in-house system from Duktape to quickJS to take advantage of the support for ES6 features and good module support (including dynamic imports).
Have ported some simple class libraries to be imported as shared object modules. But getting stumped with more advanced inter-operation issues. quickjs.h contains approximately 400 entries, but there are less than 2 pages of documentation for the C-API.
Any suggestions as to where more detailed documentation could be found?
Failing that pointers to any well documented project using quickJS might help. Yes, I have Googled and haven't found anything useful.
I am also in the same boat,QuickJS docs & examples are hard to find here are the best ones I found so far :
https://github.com/sntg-p/QuickJS-raylib : very nice as it wraps a good portion of the relatively large RayLib API
https://github.com/saghul/txiki.js might also have some nice things (as it wraps libuv amomngs other things
a more simple example https://github.com/calbertts/async-quickjs
hope the above examples help !
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
are there any tools for symbolic execution on binaries. i mean using which, we do not require to modify the source code - like klee_make_symbolic
or we can do such changes in IR (llvm ir etc.)
thanks in advance
Maybe miasm can fit your requirements. It is a reverse engineer framework that supports static symbolic execution. As far as I know, it is more simple than KLEE and S2E.
Canonical list is in Awesome Symbolic Execution.
Symbolically executing binary code is much much harder, so i doubt there are such tools exist.
However note that you don't necessarily need to modify your code when using KLEE because it can model POSIX environment and C library (when compiled with support for this, of course). Using these features you can automatically symbolize argv arguments and keyboard interaction.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have got a c++ software from git.There is no documentation of the code.To understand the code, I need a way to figure out the classes & which functions call the other, preferably in the form of a tree.
I tried with doxygen, but i got only class description. I didnt get function hierarchy. Is it possible to get function hierarchy details using doxygen?
Eclipse (CDT - which is the C++ version) and Visual studio IDEs support building call hierarchies and caller hierarchies for any method you choose.
You can start from the main() and then dive in...
I suppose other IDEs such as CLion also support this.
I am presonally not familiar with a tool that will graph out all the code at once and in any case I think the output of such a full graph would be unreadable.
I suggest you choose an IDE and go from main() and build "call hierarchies" from the methods. Another good method would be to run it with debug and trace through it, then you can choose how deep you can go into the call hierarchies of the methods.
You can use a proper IDE like Microsoft Visual Studio. Here requested link for doxygen. You can clone it from git
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of a free tool, similar to what is built into Visual Studio 2010 for managed code, that can do analysis of unmanaged, MFC C++ code and give metrics (lines of code, dependency or coupling, etc)?
I've been searching on Google for awhile, but really haven't been able to find anything that works. Thanks a ton!
Source Monitor is a good free tool tool for code metrics such as LoC and complexity and also produces kiviat graphs. But it does not have any depedency or coupling metrics.
Our SourceMeter tool can analyze your Visual C++ project and provide you all the information you asked for: metrics (lines of code, dependency, coupling, 60+ metrics altogether). The results are in standard CSV files, which you can easily open in e.g. spreadsheet editors.
I am not sure about free tool but one paid tool which is most comprehensive is IBM's Logiscope http://www-01.ibm.com/software/awdtools/logiscope/
Not free but QA-CPP does metrics like cyclomatic complexity and static analysis.
It's fairly complex to set up but they are pretty good on product support and regularly put out updates.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am porting a large, messy, 10 year old cold base in C++ from Metrowerks on OS X to XCode. There are so many files and all the other people that touched this over the years are gone. Nobody know what files are actually needed and which are just cruft.
Is there any tool that I could run and have it produce a list of what files are ACTUALLY needed?
You could run doxygen on your project and have it generate inheritance diagrams for your classes. It can also generate caller graphs to help you find dead code.
You can try searching this static code analyzer list in Wikipedia. The ones that I've seen in actions would be cppdep and Include Hierarchy Viewer, although the first one is a little rough and the latter is a Windows analyzer only for the include tree. Also that still might not give you all the info if the dependencies are not explicit.
Edit: Also, the following StackOverflow search query seems to have results that might interest you:
https://stackoverflow.com/search?q=c%2B%2B+dependency