01-30-2012 02:45 PM
hello,
is it possible to debug forked process
if( ( pid = fork() ) == -1 ) {
perror( "fork" );
return -1;
}
if( pid == 0 ) {
printf("I am a child");
return 0;
}
so, how can I make breakpoint at "printf" work (stop)?
Thnaks.
01-30-2012 09:35 PM
01-30-2012 11:32 PM
Thanks for advice. Tried to specify
set follow-fork-mode child
in .gdbinit with no luck.
01-31-2012 04:31 PM
I tried using both the IDE and gdb command line. Unfortunately follow-fork-mode isn't working for me either.
I've followed up with our debugger experts and they are looking into a fix.
03-16-2012 11:59 AM
Hi , I just ran into the same issue and tried the 'set follow-fork-mode child' in .gdbinit with no success. I tried raise(SIGINT) in the child but that didn't work either.
Has anything come of this issue?
Thanks,
Norm