Follow-fork-mode and inferiors
Kevin Pouget
kevin.pouget@gmail.com
Wed Apr 13 13:33:00 GMT 2011
Hello,
I noticed a behavior which appears strange to me, I would like to know
if it was expected:
> (gdb) list
> 1 int main() {
> 2 fork() ;
> 3 }
>
> (gdb) break 3
> (gdb) set follow-fork-mode child
> (gdb) run
> ...
> Breakpoint 1, main () at fork.c:3
> 3 }
> (gdb) info inferiors
> Num Description Executable
> * 2 process 26039 /home/kevin/travail/arm/perso/root/sample/fork-threads/fork
> 1 <null> /home/kevin/travail/arm/perso/root/sample/fork-threads/fork
why are there two inferiors? I expected either to stay in inf 1 (if
the pid of an inferior can change) or inf 1 to disappear, but not to
keep both of them!
thanks,
Kevin
More information about the Gdb
mailing list