使用valgrind进行GDB远程调试 [英] GDB remote debugging with valgrind
本文介绍了使用valgrind进行GDB远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果使用 gdb
进行远程调试,则使用
If I remote debug using gdb
I connect to the gdbserver
using
target remote host:2345
如果我使用valgrind和gdb调试内存错误(以打破无效的内存访问权限)
If I debug memory errors with valgrind and gdb (to break on invalid memory access) I use
target remote | vgdb
(启动
valgrind --track-origins=yes --vgdb=yes --vgdb-error=0 [binary]
在本地计算机上)
我可以结合使用这两者来调试远程计算机上的内存错误吗?
Can I combine the two to debug memory errors on a remote machine?
请注意,我要避免使用远程计算机上的登录Shell来在那里工作。
Note that I want to avoid using a login shell on the remote machine to work there.
推荐答案
我可以结合使用这两者来调试远程计算机上的内存错误吗?
Can I combine the two to debug memory errors on a remote machine?
是:当前vgdb接受-port =
自此提交以来的参数:
Yes: current vgdb accepts --port=
argument since this commit:
r12204 | sewardj | 2011-10-22 13:38:08 -0700 (Sat, 22 Oct 2011) | 5 lines
因此运行 vgdb --port = 2345
,然后(gdb)目标远程主机:2345
照常。
这篇关于使用valgrind进行GDB远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文