While using GDB MI instruction I found that in case a program forks to create child process it starts debugging the last child only. So if I try to debug break in parent it does not breaks at that point:
I found this valuable reference in stackoverflow.com:
How do I debug the child process after fork() in gdb?
My question is that how I can set the follow-fork-mode mode and via which GBD MI API?
http://src.gnu-darwin.org/ports/editors/setedit/work/setedit/libmigdb/doc/reference.html