Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate Call-Tree from cscope database

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.

like image 602
osgx Avatar asked Feb 01 '10 17:02

osgx


2 Answers

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

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

like image 94
user406948 Avatar answered Sep 29 '22 08:09

user406948


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.

like image 44
narcissist168 Avatar answered Sep 29 '22 08:09

narcissist168