Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为另一个进程 [Task A] 调用的子进程 [Task B] 设置断点。
我使用 set follow-fork mode child 从父进程切换到子进程。但是,GDB 并没有在子任务中停止,而是运行并返回到任务 B。
有没有办法可以停止子任务并调试它?
我发现这个资源过去对这种性质的事情很有用http://www.delorie.com/gnu/docs/gdb/gdb_26.html
当然,正如对您问题的第一条评论所暗示的那样,请仔细检查断点是否实际上位于子执行路径中。