fmII
Sat, Jul 26th home | browse | articles | contact | chat | submit | faq | newsletter | about | stats | scoop 23:45 UTC
in
Section
login «
register «
recover password «
[Project] add release | add branch | add screenshot | broken links | change owner | email subscribers | update project | update branch (urls) [Project]

 ncc - Stable branch
Section: Unix

 

Added: Sat, Apr 13th 2002 09:59 UTC (6 years, 3 months ago) Updated: Wed, Aug 29th 2007 09:06 UTC (11 months, 2 days ago)


Screenshot About:
ncc is a C source code analyzer which generates program flow and variable usage information. Using it should be as easy as changing CC=gcc to CC=ncc in makefiles, and effort has been made to support most common gcc extensions. ncc has been tested with the sources of the Linux kernel, gtk, gcc, gdb, bind, mpg123, ncftp, and many other famous projects.

Author:
Stelios Xanthakis <sxanth (at) ceid (dot) upatras (dot) gr> [contact developer]

Rating:
8.43/10.00 (1 vote)

Homepage:
http://students.ceid.upatras.gr/~sxanth/ncc/index.html
Tar/GZ:
http://students.ceid.upatras.gr/~sxanth/ncc/ncc-2.7.tar.gz
Changelog:
http://students.ceid.upatras.gr/~sxanth/ncc/CHANGES

Trove categories: [change]
[License]  Freeware, OSI Approved :: Artistic License
[Programming Language]  C
[Topic]  Software Development, Software Development :: Compilers

Dependencies: [change]
No dependencies filed

 
Project admins: [change]
» submissions (Owner)

» Rating: 8.43/10.00 (Rank N/A)
» Vitality: 0.03% (Rank 2462)
» Popularity: 4.34% (Rank 867)

project statsdownload stats
(click to enlarge graphs)
   Record hits: 34,169
   URL hits: 19,602
   Subscribers: 132

Other projects from the same categories:
CAFE Linux
Fweb
Hat
wingS
phpDoc

Users who subscribed to this project also subscribed to:
NeMeSI
mharc
Sendmailizer
Gajim
zoneadm


Add comment · Rate this project · Subscribe to new releases · Ignore this project · Email this project to a friend · Project record in XML

 Branches

Branch Version Last release License URLs
Stable 2.7 29-Aug-2007 Artistic License Homepage Tar/GZ Changelog

 Comments

[»] Segmentation fault in Debian g++ 4.0
by Deepak Ravi - Nov 20th 2005 23:22:06

Bug:
Compiling the code with Debian g++ 4.0, gives me segmentation fault.

Reason:
Filez.alloc() modifies Filez.x
Filez.x [last = Filez.alloc ()].indx = indx + 1;

This issue is similiar to
i=i++ + ++i; etc.


Solution: separate the code.
last=Filez.alloc();
Filez.x [last].indx = indx + 1;

Similiar piece of code can be found in the code..
Also, update the other places too..
like:
arglists.x [ID = arglists.alloc ()] = intdup(Query);
etc.

[reply] [top]


    [»] Re: Segmentation fault in Debian g++ 4.0
    by submissions - Jan 29th 2006 08:11:57

    Thanks for tracking this down! Fixed in 2.3

    [reply] [top]


[»] can't build ncc 2.1 on Fedora Core 3
by JavaDood - Mar 30th 2005 17:59:35

While building ncc on SuSE 8.1 with a 2.4 kernel works just fine, when I attempt the same on FC3 (i386) 2.6.10-1.770_FC3
I first get this complaint.

$ make
g++ -Wall -g -O2 -c dbstree.C
In file included from dbstree.C:17:
dbstree.h: In member function `void dbsTree<dbsNode>::dbsBalance()':
dbstree.h:74: error: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available
dbstree.h:74: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make: *** [objdir/dbstree.o] Error 1



So I take the recommendation and add the argument CFLAGS=-fpermissive to the make command and then I get this:


$make CFLAGS=-fpermissive
g++ -fpermissive dbstree.C
In file included from dbstree.C:17:
dbstree.h: In member function `void dbsTree<dbsNode>::dbsBalance()':
dbstree.h:74: warning: there are no arguments to `alloca' that depend on a template parameter, so a declaration of `alloca' must be available
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crt1.o(.text+0x18): In function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [objdir/dbstree.o] Error 1




Can anyone see what I am doing wrong?

Thanks!

[reply] [top]


    [»] Re: can't build ncc 2.1 on Fedora Core 3
    by submissions - Mar 31st 2005 03:00:52

    Hi.

    Please try replacing "alloca" with "__builtin_alloca".
    This is a gcc problem (usually each new version of gcc breaks software so we all have to catchup every time. The gcc folks are already doing too much work so let's tolerate it).

    If it doesn't work, you could use malloc/free in dbsBalance, until the next version.

    Thanks for reporting this.
    Stelios

    [reply] [top]


      [»] Re: can't build ncc 2.1 on Fedora Core 3
      by JavaDood - May 23rd 2005 14:58:36


      > Hi.

      >

      > Please try replacing "alloca" with

      > "__builtin_alloca".

      > This is a gcc problem (usually each new

      > version of gcc breaks software so we all

      > have to catchup every time. The gcc

      > folks are already doing too much work so

      > let's tolerate it).

      >

      > If it doesn't work, you could use

      > malloc/free in dbsBalance, until the

      > next version.

      >

      > Thanks for reporting this.

      >

      > Stelios

      >

      >

      >



      Replacing alloca with __builtin_alloca worked great and I am able to run ncc and nccnav now. Thanks!

      [reply] [top]


    [»] Re: can't build ncc 2.1 on Fedora Core 3
    by waspswarm - May 19th 2005 11:20:07

    Try this patch,

    --- dbstree.h.orig 2005-05-19 08:49:27.347302576 -0700
    +++ dbstree.h 2005-05-19 08:49:47.371258472 -0700 @@ -7,6 +7,7 @@
    #define HAVE_DBSTREE
    #define DBS_MAGIC 32
    +#include <alloca.h>
    extern char *StrDup (char*);
    #define TX template<class dbsNode>

    As you can see, it ads an inclusion of the alloca.h header to the offending header file dbstree.h.
    It built fine for me on CentOS 4 after that without needing the -fpermissive CFLAG. I haven't tried building anything with it but that will be next.

    cheers,
    scott

    [reply] [top]


    [»] Re: can't build ncc 2.1 on Fedora Core 3
    by Deepak Ravi - Nov 20th 2005 23:13:33

    Well, the code shouldn't depend on the compiler, i mean gcc, how the gcc define alloca.

    Theoritically, alloca is defined in alloca.h.


    In Debian g++ 4.0,
    including global.h, solves this issue.


    > While building ncc on SuSE 8.1 with a

    > 2.4 kernel works just fine, when I

    > attempt the same on FC3 (i386)

    > 2.6.10-1.770_FC3

    > I first get this complaint.

    >

    >

    > Can anyone see what I am doing wrong?

    >

    > Thanks!

    [reply] [top]


[»] work with the 2.6 kernel?
by Jesse B - Sep 10th 2004 14:09:13

Hi, i was wondering if anyone has this working currently with 2.6.7 or newer kernel.

things seem to go pretty well then i get this: Opening preprocessed file NCC.i
2334 lines
ncc-error unaccaptable declaration, separator; --> [void]
/home/jbrandeb/linux-2.6.7/include/asm/bitops.h (37): syntax error:"; unsigned l
ong arg0 , arg1 , arg2 , arg3 ; } ; extern long do_no_restart_syscall ( struct r
estart_block * parm ) ; static __inline__ void set_bit ( int nr , unsigned long
* addr ) { __asm__ ( "lock ; btsl %1,%0" : "=m" ( ( * ( long * ) addr "
make[1]: *** [drivers/net/e100.o] Error 1
make: *** [_module_drivers/net] Error 2

and i don't quite get whats wrong.

[reply] [top]


    [»] Re: work with the 2.6 kernel?
    by submissions - Sep 11th 2004 02:52:57


    >

    > things seem to go pretty well then i get

    > this: Opening preprocessed file NCC.i

    > 2334 lines

    > ncc-error unaccaptable declaration,

    > separator; --> [void]

    >

    The error messages are not very precise in the
    location of the error. General bug hunting instructions:

    Use CC=ncc -ncoo -ncspp

    The -ncspp option will instruct ncc to keep preprocessed source files.
    - Now by looking at the compilation log it's possible to find which source file had the problem.
    - Say it's 'ide-drivers.c'.
    - Locate the file 'ide-drivers.i'.
    - Copy this to 'cp ide-drivers.i PROBLEM.c'.
    - Send PROBLEM.c to [sxanth@ceid.upatras.spammers.gr], omitting spammers.

    Alternatively, try:
    - 'ncc -ncmv PROBLEM.c'
    - By looking at the output it is possible to see the location of the problem.
    - With an editor 'vi PROBLEM.c' you can look for weird code near the error.
    - Fix the bug. Send patch. Continue hacking.

    Stelios

    [reply] [top]


[»] some parse error on linux kernel
by Julien - Jan 22nd 2004 13:29:26

hello,
I'm using ncc to analyse linux kernel 2.6.1 and I get two errors from ncc :

- ncc returns "ABSENT symbol" when asm appears on line like

int *foo __asm__("r31") = 0;

- ncc returns "open" error when you initialize constant unbounded array of struct with typedef :

typedef struct foo tab_t[];
tab_t bar = { {...}, {...}};

Best regards,

[reply] [top]


    [»] Re: some parse error on linux kernel
    by submissions - Feb 4th 2004 06:47:00

    All these fixed in the 1.7 version which has just been released. Those specific bugs were fixed by Ben Lau.

    [reply] [top]


[»] C++
by Bluebird - Jan 30th 2003 02:00:45

Can or will ncc support C++ ?

[reply] [top]


    [»] Re: C++
    by submissions - Jan 30th 2003 05:07:38


    > Can or will ncc support C++ ?

    It can't and it probably won't.
    Support for C++ is a huge project (think of : operator overload, function overload, templates). I wouldn't do it just for fun.

    Let's hope somebody will hack gcc and add a couple of printfs in the right places to get the ncc effect.

    [reply] [top]


[»] New Releases?
by submissions - Dec 4th 2002 01:48:51

Hello fellas. I'm the programmer of ncc and I'd just wanted to say that there are no new releases since 0.7 because ncc has reached the state of perfection (art?).

Usually, when we see a project that has not been updated for a long time, we tend to think it's obsolete. However, here this is not the case.

There are no bugs and no new features to be added (except from minior fixes we've discovered with Scott McKellar, but which are too minior to bother the freshmeat audience with a release).

So, consider version 0.7 to be the final version of ncc (like Tex 3.1415926). A rare thing in programming, since "you can't write a tool AND use it", and many people are trapped in tool development forever (kernel, compiler, etc), instead of *using* their tools.

S.X. -- One of the 137,891 users of freshmeat

[reply] [top]


    [»] What do you know?
    by submissions - Dec 24th 2002 11:34:03

    Just when I said there's nothing more to be done, terrible enlightment came upon me and I did version 0.9!
    Lesson learned: To do something, announce you won't do it. Sometimes.

    Merry X-mas

    [reply] [top]




© Copyright 2008 SourceForge, Inc., All Rights Reserved.
About freshmeat.net •  Privacy Statement •  Terms of Use •  Trademark Guidelines •  Advertise •  Contact Us • 
ThinkGeek •  Slashdot  •  Linux.com •  SourceForge.net  •  Jobs