如何在 GDB 中使用跟踪
在 gdb 文档中:
跟踪点工具当前仅可用于远程 目标。请参阅指定调试目标部分。此外,您的 远程目标必须知道如何收集跟踪数据。这个功能 在远程存根中实现;然而,没有任何存根 截至撰写本文时,已与 GDB 支持跟踪点一起分发。
强调我的。我在哪里可以获得这样的存根(对于在 Debian x86 或 x64 上使用 GCC 编译的 C/C++ 代码)?或者我该如何制作一个?有关编写存根的文档仅提到实现与串行端口通信的功能。谢谢!
In the documentation for gdb:
The tracepoint facility is currently available only for remote
targets. See section Specifying a Debugging Target. In addition, your
remote target must know how to collect trace data. This functionality
is implemented in the remote stub; however, none of the stubs
distributed with GDB support tracepoints as of this writing.
Emphasis mine. Where can I get such a stub (for C/C++ code compiled with GCC on Debian x86 or x64)? Or how do I go about making one? The documentation on writing stubs only mentions implementing functions to communicate with the serial ports. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对遥控器了解不多,但 gdb 中的一些目标现在支持跟踪点
可能有一种方法可以使用“正常”gdb info 或 show 命令来解决此问题,但我找不到它。在下面的输出中,由于“supported=1”,跟踪点受到支持,
这可能不仅限于 gdb 存根,还包括运行存根的内核。
I don't know much about remotes but some targets in gdb now do support tracepoints
there is possibly a way to get at this using a 'normal' gdb info or show command, I could not find it. in the output below tracepoints are supported due to the 'supported=1',
this may not be limited to the gdb stub, but also the kernel the stub is running on.