Niv*_*Niv 7 linux debugging gdb gdbserver ddd-debugger
我正在调试使用ddd在远程目标上运行的程序(例如,远程gdbserver通过端口1234在localhost上运行,但仍然充当远程).
我知道你可以通过打开ddd连接到gdbserver,然后调用ddd target remote localhost:1234的gdb命令行,如下所述:http:
//www.gnu.org/software/ddd/manual/html_mono/ddd.html#Remote% 20Program
但是,我讨厌target remote localhost:1234每次打开ddd时都必须调用该命令,并且我想将其设置为使用别名自动连接到gdbserver.我试过运行ddd --rhost localhost:1234 program,但是一旦ddd启动了一个窗口弹出窗口,声明"GDB无法启动",并在shell中写道:
sh:1:exec:localhost:1234:找不到
任何人都知道如何在启动时连接到远程gdbserver?
TNX!
选择以下之一:
ddd --eval-command="target remote localhost:1234"target remote localhost:1234文件并用于--command
执行它target remote localhost:1234你的.gdbinit