views:

453

answers:

3

I want to generate Full and Partially Call Trees from cscope database of c and c++ projects in Linux.

The project is rather large, so it can be not easy to work with the full call tree of project, so I want to limit call tree generation with grep-like filter of function names.

And also I want to be able to build "called by" and "called from" sub-trees from any point.

So tool must be interactive and easy to patch.

PS: I want use cscope database, because it is already used in project and generating of it is rather fast. I use vim editor and have X windows system.

There is cbrowser program on sourceforge, but its call-tree (callgraph) functionality is broken.

+1  A: 

I'm not aware of any programs, other than cscope, that read cscope databases. Even vim's cstag functionality just starts a background cscope process which it queries.

As for call-graph generation, if you don't mind stepping outside cscope, I rather like what doxygen creates. They can be a little big, but it also generates the from almost all points, and it's incredibly easy to browse source directly in it.

Circuitsoft
cbrowser from sourceforge does read cscope db.
osgx
+1  A: 

if you want to do it using vim here is a way:

http://www.vim.org/scripts/script.php?script_id=2368

+1  A: 

I've made an attempt to "fix" the call tree problem in cbrowser (see http://retprogbug.wordpress.com/2010/09/18/an-attempt-to-resuscitate-cbrowser-0-8/) though being a complete programming noob I make no guarantees.

narcissist168
do you have a results? screenshoot of some sources with calltree drawed by cbrowser?
osgx