FROM:http://blog.csdn.net/wwwsq/archive/2006/09/01/1154786.aspx

$ gdb someprog
> set follow-fork-mode child
> break somewhere
> run someargs