与 gdbserver 的编程交互
gdbserver 程序允许远程调试程序。 通常,gdb 的本地副本用于与远程 gdbserver 实例以及在该远程 gdbserver 下运行的程序进行交互。
我的问题是:是否有 gdb 远程串行协议 的客户端实现(RSP)允许 gdb 以外的程序与 gdbserver 程序交互?
本文档讨论了 RSP 服务器 的实现,但它是客户端我我主要感兴趣的是。这个实现支持客户端和服务器,但实现于common lisp,还不是一个成熟的库。
The gdbserver program allows for the remote debugging of programs. Typically, a local copy of gdb is used to interact with the remote gdbserver instance, and the program running under that remote gdbserver.
My question is: Are there client implementations of the gdb remote serial protocol (RSP) that allow programs other than gdb to interact with the gdbserver program?
This document discusses the implementation of an RSP server, but it is the client side I am primarily interested in. This implementation supports client and server, but is implemented in common lisp, and is not yet a mature library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
远程 gdb 协议在 gdb 手册中有完整记录,可以在线获取
http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html
您可以将 gdb 作为一个工作示例——这应该足以让您编写一个客户端来通过串行协议控制 gdbserver。 ;-)
The remote gdb protocol is fully documented in the gdb manual, which is available online at
http://sourceware.org/gdb/current/onlinedocs/gdb_toc.html
You have gdb to look at as a working example -- this should be enough to allow you to write a client to control gdbserver over the serial protocol. ;-)
我不知道有任何 GDB 协议的客户端。
你为什么想要一个?
对于简单的任务(启动;停止;检查内存地址),您可以很快地从头开始编写一个任务。
对于复杂的任务(展开堆栈、检查变量等),您必须重新实现 GDB 的重要部分; 如果没有充分的理由,可能不应尝试这样做。
另请注意,GDB/gdbserver 协议在不断发展; 有规定让较新的 GDB 处理较旧的 gdbserver,但我不确定反之亦然。
I am not aware of any clients of the GDB protocol.
Why would you want one?
For simple tasks (starting; stopping; examining memory addresses) you can write one from scratch pretty quickly.
For complicated tasks (unwinding stack, examining variables, etc.) you'd have to re-implement significant parts of GDB; and that should probably not be attempted without a very good reason.
Also note that GDB/gdbserver protocol is constantly evolving; there are provisions to let newer GDB deal with older gdbserver, but I am not sure if the reverse is also true.