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 8 years ago.
Improve this question
I have a very long convoluted piece of undocumented nightmare code that I have to use, full of mallocs and frees. I have already found a couple that are not matched correctly. Is there any automated source code examination tool that would help me analyse it?
There is a GNU tool for this: It is called GDB, stands for the Gnu DeBugger. You can use it to load a piece of code compiled with the appropriate debug symbols. Then you can use it to put in a temporary break and step through it manually to see exactly what is going on, and you can examine individual functions/subroutines.
For C language, following open-source STATIC CODE ANALYSER tool should be good start.
Cppcheck – Open-source tool that checks for several types of errors, including use of STL.
cpplint – An open-source tool that checks for compliance with Google's style guide for C++ coding.
Clang – An open-source compiler that includes a static analyzer.
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 3 years ago.
Improve this question
It's always hard to understand new code,
especially if it is spread over many files with
hundreds of functions - like most linux kernel parts.
I think it is easier to understand the big picture if it is
visualized and if you can follow the links "with your eyes".
I am therefore looking for a tool to visualize C code,
which function is calling which one, where is the entry
and so on.
I would prefer a vscode plugin but it doesn't really matter.
Thank you in advance!
You might want to try these tools:
https://github.com/johnyf/pycflow2dot
Layout C call graphs from cflow using GraphViz dot
https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz
vscode extension for Graphviz
http://www.gson.org/egypt
egypt - a tool for making call graphs
https://kcachegrind.github.io
KCachegrind profiling tool Callgrind and the profile data visualization
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 8 years ago.
Improve this question
I am working on embedded project that requires almost same kind of code template for each new implementation.
Instead of doing manual code, I am thinking to automate the code generation process.
So that I only need to provide input data to the tool in some format (could be any input format) and it generated C code according to it.
Open source would be the first choice but proprietary tools are also acceptable.
I already searched for Eclipse Modeling plugins Acceleo and Actifsource but didn't find them suitable for Embedded C code generation.
And I don't want to use heavy solution like MATLAB and LabVIEW just for code generation.
C code generation from UML models is possible with tools such as:
IBM Rational Rhapsody
Open source Eclipse plugin Topcased
There are many variants of C code generation:
function pointers (parent function do the same code exept a little variant)
inline functions + macro (parameters of macro could define a new functions)
systems like make, cmake, autotools (you write an input-file wich is modified at precompiling)
Tell more if you want to get more detailed answer.
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 need to perform static taint analysis on my C program. I tried using Splint, no luck. Are there any other open source or freeware tools that are available to perform taint analysis?
If yes, can you please also mention about the way to use it or refer to any link. Appreciate your help. Thanks
Searching google I have found the following that support taint analysis for C programs:
http://code.google.com/p/tanalysis/
http://www.cs.umd.edu/~jfoster/cqual/ -- see their printf format string example
I haven't tried it, but taintgrind (for Valgrind) is probably where I would start. It's on GitHub and seems reasonably "alive".
You can use SAINT: a static taint analysis tool for C to perform static taint analysis on C programs.
The tool is still in development.
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'm looking for a testsuite for the C Standard Library (mainly for the algorithms not contacting the "outer world", so strcpy(), memcmp(), itoa() & likes).
I tried downloading the GCC sources, but they're very large and I have trouble finding anything I could reuse in there...
(To be clear, the question is meant about the ANSI C Standard Library, not POSIX or else. Also, I'd like for the tests to be rather portable.)
The public domain C library has quite simple test cases, which are embedded in each source code file. For example: memcpy, strtol
Newlib has test cases organized as a test suite. They are more complex, but not nearly all functions are covered: memcpy
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 8 years ago.
Improve this question
I program mostly in C while studying at university. I was wondering if there is some simple open-source library that would let me make a GUI for a program in C.
Things to concider by priority:
Simple
Nice-looking
Features
I don't know how to program in C++ and would prefer to stay in pure C.
i would highly recommend Glade + GTK.
i use it in combination with python, and it works quite well.
it's also very simple to use.
here is an example:
http://people.gnome.org/~newren/tutorials/developing-with-gnome/html/apc.html#libglade-example-1
hope that helps!
EDIT:
here is a more extensive tutorial:
http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html
However, notice that it might be difficult to write GUI code in C which runs on many different systems (e.g. on Linux, MacOSX, Android, and Windows). Gtk claim to have such a goal, but I don't know if it fully reached.