title: Automatic tracing of program execution
body: <p>I would like to know if we can enable tracing in any C or C++ application. </p>
  
  <p>For example, with a gcc option or a small tool, I will enable trace and either trace is printed on console or dumped to a file.</p>
  
  <p>Since there are lots of files and function / classes, I don't want to start adding the trace prints manually.</p>
  
  <p>If such tools are not available, next choice is use scripting and try to add at the trace printing.</p>
  
  <p><code>strace</code> is not much useful as it gives mainly the system calls. </p>