【问题标题】:gdb cant execute command while the target in running while remote debugging远程调试时目标运行时gdb无法执行命令
【发布时间】:2016-11-23 10:09:47
【问题描述】:

我正在使用 gdb 和 gdbserver 来调试我的 exe。我的目标目前与本地主机相同。我使用

启动 gdbserver

gdbserver.exe :6000 MyTest.exe 1> NUL 2> NUL

我的 gdb 是使用

启动的

gdb.exe -ex "set target-async on" -ex "target remote :6000"

但是当我尝试info threads 或设置或获取全局变量时,我无法执行命令目标运行。我尝试在设置之前使用中断,但这并没有改变任何东西。有谁知道可能出了什么问题或我做错了什么?

【问题讨论】:

    标签: gdb gdbserver


    【解决方案1】:

    您的代码中没有gdb.exe 的输入文件。将相同的MyTest.exe 文件提供给主机上的gdb,以便gdb 可以加载符号

    gdb.exe MYTest.exe
    (gdb)set target-async on
    (gdb)set target remote :6000
    

    【讨论】:

      猜你喜欢
      • 2014-12-15
      • 2014-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-22
      • 1970-01-01
      相关资源
      最近更新 更多