Thread: Code Analisys Tools for Linux C programs

  1. #1
    Registered User
    Join Date
    May 2010

    Code Analisys Tools for Linux C programs

    On Linux are there any type of tools or software that will do things like...

    List all functions in a .C file
    Show function calls in a linkage diagram (kinda like database schema diagram)
    Other type analisys ??

    I'm using ctags, cscope, ctree, Doxygen etc. and vi, but its just really kludgy.
    I also tried Cxref, which is nice for small programs, but it's much to small.

    I don't care if its for emacs, vi or standalone.

    I'm looking for good C code analisys tools, For C, I'm not working with C++.

    Thanks for the help,
    Last edited by Areal Person; 03-10-2011 at 01:30 AM.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Long Beach, CA
    This belongs in the general board since it isn't really a C related question, but...

    I have used a ctags, cscope, doxygen and vim setup for years and loved it, though it did take a little tweaking, and some plugins and scripts, etc to get things dialed in and make sure my tag and cscope databases were kept up to date. If you do/can use X Windows, you have more options for a stereotypical IDE that might have these features. There's Eclipse, and I think Gnome and KDE both come with their own IDE, but I've never used them.

    Valgrind is great for code analysis. It does memory usage/leaks, buffer overflows, heap profiling, static function call analysis, thread locks, and more. There are viewers for making a nice presentation out of some of that data, KCachegrind comes to mind, but that's it. Lint is another tool that does some code analysis, but I haven't used it since college. I imagine it's still available, but I think Valgrind does all that and then some.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    A free tool like Lint is splint
    Splint Home Page
    but be warned, if you thought lint was picky, then splint will be a shock.
    But to get the best from it, you have to annotate the code with various comments to give the tool some extra information (like doxygen comments, only more precise).

    For a graphical view of the code base, try Source Navigator (there seem to be two versions at the moment)
    Source-Navigator | Download Source-Navigator software for free at
    source navigator NG
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    May 2010

    Thanks so very much !!

    Source-Navagitor Is Wonderfull !!!!!!
    It's just what I was looking for !


  5. #5
    Registered User
    Join Date
    Mar 2009
    LLVM is the basis for a bunch of static analysis tools, e.g. Clang Static Analyzer. Google will likely turn up a lot more things to play with.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debugging tools?
    By cpjust in forum Tech Board
    Replies: 6
    Last Post: 01-12-2011, 04:51 PM
  2. cygwin on win64
    By Vanzemljak in forum Tech Board
    Replies: 3
    Last Post: 01-12-2011, 04:28 PM
  3. dynamic array
    By mouse666666 in forum C Programming
    Replies: 36
    Last Post: 04-11-2010, 02:27 AM
  4. Replies: 4
    Last Post: 01-16-2002, 12:04 AM
  5. code to run (linux) programs WITH arguments
    By N8760 in forum C++ Programming
    Replies: 3
    Last Post: 12-27-2001, 03:35 PM