2

Using the different Valgrind tools for profiling and debugging individual programs is easy. I am working on a big project with lot of modules and packages. (for Router SoC).

On Building the model, how do I use Valgrind for debugging during compilation of the entire model? Should I include Valgrind in the makefile (Because I don't want to run Valgrind separately for every individual file)? All I want is during the compilation of the entire big model, I want Valgrind's output log files for every individual C program?

Starfish
  • 1,083
  • 10
  • 23
Akshaa
  • 91
  • 1
  • 3
  • I don't get the point. Probably you should split your project in many tests and then run valgrind on the tests singularly. – linello Jan 11 '13 at 14:54

1 Answers1

0

You may try something like valgrind --trace-children=yes --log-file="log.%p" the-whole-shebang. The %p is substituted for pid. You can throw in some --trace-children-skip or --trace-children-skip-by-arg options if you wish to skip certain uninteresting parts. See valgrind man page for details. Or perhaps combination of --log-socket and valgrind-listener? It would be easier to filter output that way if you are up for little scripting.

Miroslav Franc
  • 1,282
  • 12
  • 13