Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 May 2004 10:38:16 +0200
From:      "Stefan A. Deutscher" <sa.deutscher@tiscali.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: [OT] Tool to convert src code to flowchart
Message-ID:  <20040514083816.GA2184@tiscali.de>
In-Reply-To: <opr697djlrrcgix0@shawmail>
References:  <Pine.GSO.4.33.0404291725150.13202-100000@themis.cs.uh.edu> <opr697djlrrcgix0@shawmail>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@mailaps.org
============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040514083816.GA2184>