tags:

views:

34

answers:

1

Hi to every one I type the following command in the command line in order to generate control flow graph for a c program by gcc 3.4.5 but I couldn't find the result files. In addition, how do I see the control flow graph garphicallyy? Thanks

A: 

You forgot to include your command-line... I assume -fprofile-arcs. The output file location is described in the gcc manpage:

    ... Each object file's auxname is
    generated from the name of the output file, if explicitly speci-
    fied and it is not the final executable, otherwise it is the base-
    name of the source file. In both cases any suffix is removed (e.g.
    foo.gcda for input file dir/foo.c, or dir/foo.gcda for output file
    specified as -o dir/foo.o).

So, output is written alongside the object files - in their directories. If you compile source directly to an executable, you'll find the profiling output in the directory the compiler wrote the executable to.

Tony
sorry the command is $ gcc -o -dv prog.cpp -o prog.cpp
Arasteh