my program processes large errors and during development in produces large amount of output on the console. It suffers from memory corruption and I try to use valgrind to locate the error.
Unfortunately, i can’t find the error messages among the output lines, and they flushing by too fast to cancel execution when they pop up. They have to be there in order to locate the error ( which element does cause the error and so on ). Redirecting then within my program doesn’t work, just like piping the output does only redirect the program output, not the valgrind output.
Can you give me a hint how to solve this.
You can ask
valgrindto save its output into file:where
<filename>is the file name for output. Later you can view this file withlessor text editor.