我们有两个 C++ 程序,p1 和 p2。 p2 派生并启动 3 个子进程,每个子进程通过 execvp() 调用 p2 的二进制可执行文件。 调试p1时如何在p2上加gdb断点并调试到p2中?
最佳答案
How can I add gdb breakpoints of p2 and debug into p2 when debugging p1?
您希望在较新的 GDB 版本中提供多劣势支持。文档 here .
关于c - 如何通过 execvp 将 gdb 调试到子进程中启动的进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24821325/