关于通过串口实现gdb调试的问题

在ARM上想用串口调试程序。
脚本如下
[+script] .script = {

Programs require the runtime linker (ldqnx.so) to be at a fixed locatio

procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2
devc-serprimecell -e &
reopen
display_msg Welcome to Neutrino on the Integrator/AP Board
pipe &
devc-pty &
pdebug /dev/ser1,115200 &
[+session] sh
}
运行shell时正常,并且pdebug也在运行(由pidin知)
但是当我gdb连接的时候出错了,如下过程:
运行ntoarm-gdb
target qnx com1
Remote debugging using com1
Timeout.
Timeout.

target remote com1
Msg:
ignoring packet error ,continuing…
ignoring packet error ,continuing…

Is there anyone can tell me the reason?

经过这几天的调试,发现原来是debug用到的串口和Console的重复了。现在将控制台使用ser2。此时可以连接gdb成功,并且运行info pid显示进程也是正确的。
但是问题是:当我run ls的时候确出现TimeOut的现象。
又被卡住了。真的希望哪位前辈能够帮忙指点一下。谢谢!

你的ls是在/bin下面,还是在/proc/boot下面?试试全路径 (run /bin/ls) 看行不行。

谢谢Xtang。
我的ls是在/proc/boot下面。我试了用run /proc/boot/ls来运行,结果也是一样。 先是显示Starting program : /proc/boot/ls。之后没有出现任何提示符。我的强行输入’c’,没有反应。过会就出现TimedOut. MsgNak received - resending。等待了几次TimeOut.之后就又回到(gdb)提示符下了,但是这个时候,运行info pid等命令就没有正常显示了而是像运行ls一样出现了TimedOut。
之后,把gdb关掉,再连接就连不上了。 我的TimeOut时间设置肯定没有问题,
因为,我开始运行infopid 的时候显示应答的很快,并且我将TimeOut设的比默认的再长一些也依然没有效果。

有没有可能是与通过gdb运行程序时的控制台的切换相关呀?比如运行ls的时候切换成console = /dev/ser2输出了。但是我觉得至少在gdb端有所反应才对呀。
或者有没有可能是在运行run的时候需要什么支持的进程呀?我看过qnx帮助文档的,好想除了devc_pty外也没有提到什么。

我的buildfile如下。
###START###
[virtual=armle,binary]
.bootstrap =
{
startup-integrator -v
PATH=/proc/boot procnto -vvv
}
[+script] .script =
{
procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

Initialise the console

devc-serprimecell -e &
reopen
display_msg Welcome to Neutrino on the Integrator/AP Board
devc-pty &
pdebug /dev/ser1,115200 &
[+session] sh
}

Redirect console messages

[type=link] /dev/console=/dev/ser2
[type=link] /tmp=/dev/shmem

Shared libaries

libc.so

Executables

[data=c]
devc-serprimecell
sh=fesh
ls
pdebug
devc-pty
pidin
pipe
###END###

谢谢!