[hellogcc] Re: [hellogcc] 关于GDB remote serial protocol

  • From: Yao Qi <qiyaoltc@xxxxxxxxx>
  • To: hellogcc@xxxxxxxxxxxxx
  • Date: Wed, 3 Aug 2011 10:24:59 +0800

2011/8/1 Triple Yang <triple.yang@xxxxxxxxx>:
> GDB源码中的remote.c文件包含了对remote serial
> protocol(RSP)的封装,但是我看6.8和7.2版本中的remote-mips.c和remote-m32r-sdi.c都没有直接调用remote.c中的函数,而是使用了serial.c中的serial_read()和serial_write()函数。谁能说明下serial.c和remote.c间的关系?
>

我没有看过serial.c,所以不太清楚它是干什么的。 remote.c是实现了rsp,和serial.c没有关系。

remote-mips.c的注释“Remote debugging interface for MIPS remote debugging
protocol.”,说明这个文件其实实现的也是一个协议,而serial.c只是这个协议的传输介质 (我猜的)。

> 此外remote-mips.c中非常明显地使用了自定义的包格式。如果想要遵从RSP,那应该怎么选择?有合适的例子推荐吗?

如果你想遵从rsp,其实你是想实现一个stub。你可以参考一些开源jtag软件,它们就是把gdb的rsp翻译成相应的jtag命令。  It
is not small a piece of work :)  Good luck!

-- 
Yao Qi <qiyaoltc AT gmail DOT com>
http://sites.google.com/site/duewayqi/

Other related posts:

  • » [hellogcc] Re: [hellogcc] 关于GDB remote serial protocol - Yao Qi