views:

30

answers:

1

Hi,

I have a timing bug in my application which only occurs when I use valgrind, because valgrind slows down the process so much.

(it's actually a boost::weak_ptr-exception that I cannot localize)

Now I wonder how to reproduce the bug with gdb. I don't see a way to combine gdb + valgrind.

Thanks.

+1  A: 

You can start gdb when an error is detected by valgrind (--db-attach=yes). Even if the exception doesn't trigger a memory error at the moment, it's easy to fake a bad memory access in that path.

Douglas Leeder
Thank you. Fortunately the exception wasn't caught so the debugger was started by valgrind as a result of SIGABORT.Bug found :-)
denis