[OT] Tool to convert src code to flowchart

Stefan A. Deutscher sa.deutscher at tiscali.de
Mon May 17 21:24:26 PDT 2004


On Fri, Apr , 2004 at 12:09:09PM -0600, Danny MacMillan wrote:
> On Thu, 29 Apr 2004 17:30:35 -0500 (CDT), Pranav A. Desai 
> <pdesai1 at cs.uh.edu> wrote:
> 
> >Hi!
> >   I need it for C. The chart can be ascii.
> >E.g.
> >main.c
> >------
> >main(){
> > A();
> > B();
> >}
> >A.c
> >---
> >A() {
> > C();
> >}
> >will be:
> >main -> A
> >     |  |-> C
> >     |
> >     -> B
> >etc.
> 
> I believe that's called a call graph.  A flowchart is something else 
> entirely.

Provided your code actually compiles and runs, you can also compile it
with profiling support enabled (see man gcc) and run gprof on it. That
gives you not only the call graph but also the time you spend in each
routine etc.

Cheers, Stefan

-- 
============================================================================
Stefan A. Deutscher                             |
Donostia International Physics Center           | office: ++34-943-018174
Universidad del Pais Vasco, Facultad de Quimica | fax   : ++34-943-015600
Departamento de Fisica de Materiales            | home  : ++34-943-270647
Apartado 1072, San Sebastian 20080, Spain       | email : sad at mailaps.org
============================================================================



More information about the freebsd-questions mailing list