title: How do you get Valgrind to show line errors?
body: <p>How do you get Valgrind to show exactly where an error occured? I compiled my program (on a Windows machine over a Linux terminal via PuTTy) adding the -g debug option.</p>
  
  <p>When I run Valgrind, I get the Leak and Heap summary, and I definitely have lost memory, but I never get information about where it happens (file name, line). Shouldn't Valgrind be telling me on what line after I allocate memory, it fails to deallocate later?</p>
  
  <pre><code>==15746==
  ==15746== HEAP SUMMARY:
  ==15746==     in use at exit: 54 bytes in 6 blocks
  ==15746==   total heap usage: 295 allocs, 289 frees, 11,029 bytes allocated
  ==15746==
  ==15746== LEAK SUMMARY:
  ==15746==    definitely lost: 12 bytes in 3 blocks
  ==15746==    indirectly lost: 42 bytes in 3 blocks
  ==15746==      possibly lost: 0 bytes in 0 blocks
  ==15746==    still reachable: 0 bytes in 0 blocks
  ==15746==         suppressed: 0 bytes in 0 blocks
  ==15746== Rerun with --leak-check=full to see details of leaked memory
  ==15746==
  ==15746== For counts of detected and suppressed errors, rerun with: -v
  ==15746== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 from 8)
  </code></pre>