Gdb 每当我按下control+;C

Gdb 每当我按下control+;C,gdb,embedded,remote-debugging,openocd,Gdb,Embedded,Remote Debugging,Openocd,我正在远程调试Stellaris Launchpad。我使用OpenOCD连接到stellaris,然后将GDB连接到OpenOCD提供的服务器。我使用开放式芯片调试器0.10.0-dev-00002-g79fdeb3(2015-07-09-23:28)。GDB是来自arm gcc none eabi的版本,即4_9-2015q1版本。 我这样调用openOCD: /usr/local/bin/openocd --file \ /usr/local/share/openocd/scripts/b

我正在远程调试Stellaris Launchpad。我使用OpenOCD连接到stellaris,然后将GDB连接到OpenOCD提供的服务器。我使用开放式芯片调试器0.10.0-dev-00002-g79fdeb3(2015-07-09-23:28)。GDB是来自arm gcc none eabi的版本,即4_9-2015q1版本。 我这样调用openOCD:

/usr/local/bin/openocd --file \
/usr/local/share/openocd/scripts/board/ek-lm4f120xl.cfg \
>> openocdLog.txt 2>&1 &
arm-none-eabi-gdb proj//debug/exec -x gdb//gdb.script
然后像这样的GDB:

/usr/local/bin/openocd --file \
/usr/local/share/openocd/scripts/board/ek-lm4f120xl.cfg \
>> openocdLog.txt 2>&1 &
arm-none-eabi-gdb proj//debug/exec -x gdb//gdb.script
gdb/gdb.script包含:

set remotetimeout 10000
target extended-remote :3333
monitor reset halt
load
monitor reset init
问题是,每当我点击control+c时,GDB就会断开连接。正常情况下,这将停止远程,但GDB只是断开连接:

(gdb) cont
Continuing.
^CError detected on fd 6
Remote communication error.  Target disconnected.: Interrupted system call.
(gdb) 
OpenOCD在GDB启动时有以下几点要说:

Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (1258). Workaround: increase "set remotetimeout" in GDB
这很奇怪,考虑到gdb/gdb.script文件将remotetimeout强制为一个非常大的数字

按下control+c时,openOCD会显示:

Debug: 2602 5089 hla_interface.c:119 hl_interface_quit(): hl_interface_quit

那么,我该如何解决这个问题呢?按下control+c时,如何使GDB停止遥控器而不是断开连接?

问题在于OpenOCD太过敏感。我对0.6.1有问题,但是OpenOCD的0.7.0版本工作得很好。

在使用GDB 7.8.0的OpenOCD 0.9.0上仍然存在此问题。你能链接到OpenOCD错误报告吗?我没有创建错误报告,因为我无法收集足够的信息来知道错误是否在OpenOCD中,或者是否在GDB中。在OpenOCD 0.10.0和GDB 7.12.1.20170215上仍然存在此问题。