|
From: Alex B. <ker...@be...> - 2007-10-01 16:14:23
|
Hi, I've written a test program that causes our program to fork and return a few hundred time to see if we leak when forking. However when I get a report from valgrind and it attempts to attach gdb it attaches to the wrong program: ==31867== Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to uninitialised byte(s) ==31867== at 0x71E325EB: (within /lib/libpthread-2.5.so) ==31867== Address 0x7fefff924 is on thread 1's stack ==31867== ==31867== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- Y starting debugger ==31867== starting debugger with cmd: gdb -nw /proc/31921/fd/1014 31921 As you can see the gdb it started was with the new pid. -- Alex, homepage: http://www.bennee.com/~alex/ If you try to please everyone, somebody is not going to like it. |