I'm debugging a program with Valgrind. I would like it to stop and core dump the program just after it detects the first error (so that I can examine more closely what's going on). Is this possible?
You can use gdb together with valgrind, to put breaks, step, next, and stop on errors.
Use --vgdb-error=0 and follow the instructions to connect gdb to Valgrind