启动ddd与远程gdbserver [英] Starting ddd with remote gdbserver

查看:259
本文介绍了启动ddd与远程gdbserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试使用ddd在远程目标上运行的程序(例如远程gdbserver在localhost上通过端口1234运行,但仍然作为远程)。



我知道您可以通过打开ddd连接到gdbserver,然后在ddd的gdb命令行上调用 target remote localhost:1234 ,如下所述:

http://www.gnu。 org / software / ddd / manual / html_mono / ddd.html#Remote%20Program



但是,我讨厌不得不调用目标远程本地主机:1234 命令每次打开ddd,并且我想设置它使用别名自动连接到gdbserver。我尝试运行 ddd --rhost localhost:1234程序,但是一旦ddd启动一个窗口,弹出GDB无法启动,并在shell中写: p>


sh:1:exec:localhost:1234:not found


任何人都知道如何在启动时附加到远程gdbserver?



Tnx!

解决方案

选择以下之一:


  1. ddd --eval-command = target remote localhost:1234

  2. target remote localhost:1234 code> - 命令
    执行

  3. put target remote localhost:1234 进入你的 .gdbinit


I'm debugging a program that runs on a remote target using ddd ( the remote gdbserver is running on localhost over port 1234 for example, but still acts as remote).

I know you can connect to the gdbserver by opening ddd, then calling target remote localhost:1234 on the gdb command line of ddd, as described in:
http://www.gnu.org/software/ddd/manual/html_mono/ddd.html#Remote%20Program

However, I hate having to call the target remote localhost:1234 command every time I open ddd, and I'd like to set it to connect to the gdbserver automatically with an alias. I tried running ddd --rhost localhost:1234 program, but once ddd launches a window pops stating that "GDB could not be started", and in the shell written:

sh: 1: exec: localhost:1234: not found

Anyone knows how can I attach to the remote gdbserver right on launch?

Tnx!

解决方案

Choose one of:

  1. ddd --eval-command="target remote localhost:1234"
  2. put target remote localhost:1234 into a file and use --command to execute it
  3. put target remote localhost:1234 into your .gdbinit

这篇关于启动ddd与远程gdbserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆