atree - activation trees for program understanding and debugging

atree runs a program through GDB. It sets breakpoints on all functions and makes a log of all the functions that got called. The log contains the arguments and return values of the functions. This log is then turned into a tree — a node in the tree is a function call and its children are the functions that it called, in order.

This tree is called an activation tree (each execution of a function is called an activation).

Example:

Suppose your program is this:

void bar(char c);

void
foo(int x)
{
    if(x==1)
	bar('A');
}

void
bar(char c)
{
    char f = c+1;
}

int
main()
{
    int i;
    for(i=0; i<3; ++i)
	foo(i);
    return 0;
}
Then, by running atree on it's executable, you get this output:
main()
 \_ foo(x=0)
 \_ foo(x=1)
 |   \_ bar(c=65 'A')
 \_ foo(x=2)

Todo

atree is incomplete.

Download

There are no file releases yet, but please get atree from the CVS if you wish to try it out:

cvs -d:pserver:anonymous@atree.cvs.sourceforge.net:/cvsroot/atree login
[hit enter at the password prompt]
cvs -z3 -d:pserver:anonymous@atree.cvs.sourceforge.net:/cvsroot/atree checkout atree
Or you can look at the code using the web interface to the CVS.

See also

LIZARD features


Soam Vasani <firstnamelastname*at*gmail.com> SourceForge.net Logo