firstly you should copy source code to the same directory as executable binary, and then using command: gdb attach <p_id>
other links for more information:
使用 GDB 调试多进程程序
http://www.ibm.com/developerworks/cn/linux/l-cn-gdbmp/index.html
gdb调试正在运行的进程
http://hi.baidu.com/brady_home/blog/item/6b92aa8ffdfee2e6f01f369b.html
本文介绍如何使用GDB将源代码复制到可执行二进制文件的同一目录下,并通过gdb attach命令调试多进程程序。此外,还提供了进一步了解GDB调试运行中进程的相关链接。

被折叠的 条评论
为什么被折叠?



