follow-fork-mode detach-on-fork说明
parent on GDB默认的调试模式:只调试主进程
child on 只调试子进程
parent off 同时调试两个进程,gdb跟主进程,子进程block在fork位置
child off 同时调试两个进程,gdb跟子进程,主进程block在fork位置
set non-stop on 调试线程之外的线程继续运行
set scheduler-locking off|on|step
off:不锁定任何线程,默认值
on:锁定其他线程,只有当前线程执行
step:在step(单步)时,只有被调试线程运行
gdb -d 可以下断点时区分相同文件名