views:

167

answers:

1

I was finishing up a code mod and wanted to run my program through Valgrind to make sure I've got all memory accounted for, but my program failed an assertion that doesn't fail when running on its own. Is it possible to stop in the debugger while running from Valgrind? I'm currently wading through the manual, but figured I could get my answer faster from you all.

+2  A: 

I discovered the --db-attach=yes argument. This will stop every time an error is detected and ask if you want to enter the debugger at this point.

For my program, this is proving to be difficult to use, however. I read a file from standard input for initialization, and I think Valgrind is interpreting EOLs as responding to its prompts.

Scottie T