【问题标题】:Extract execution log from gdb record in a VirtualBox VM从 VirtualBox VM 中的 gdb 记录中提取执行日志
【发布时间】:2013-06-07 19:27:36
【问题描述】:

我正在尝试使用 gdb 的记录功能来生成为 tutorial example 执行的指令列表

我可以使用gdb记录成功地前进和后退,并使用“记录保存”将执行日志保存到文件中。

我想我想做的是“记录指令历史”,来自docs

从记录的执行日志中反汇编指令

但是当我尝试这个时,我得到了错误:

当你的目标是“记录已满”时,你不能这样做

尝试将记录目标设置为 btrace 返回错误:

Target 不支持分支追踪。

我在 VirtualBox VM 中运行 gdb 7.6,我需要在本地运行还是缺少其他一些魔法。

【问题讨论】:

标签: gdb virtualbox record reverse-debugging


【解决方案1】:

您的问题来自VirtualBox 本身执行此操作的问题。正如您在this link 中看到的,更具体地说,在以下几行中:

if (packet->support != PACKET_ENABLE)
    error (_("Target does not support branch tracing."));

这个问题解释here.

But VirtualBox does NOT
emulate certain debugging features of modern x86 CPUs like branch target
store or performance counters.

我最好的猜测是安装一些其他的VirtualBox 功能,让您可以执行此类操作,或切换到新的虚拟环境。

我会继续搜索信息。

【讨论】:

  • 优秀的研究 Jean,我不再研究这个问题,但很高兴得到答案,将标记为解决方案,但会更改标题以反映问题的虚拟框特定性质。
  • 所需的 cpuinfo 标志是 intel_pt: stackoverflow.com/questions/22507169/…
猜你喜欢
  • 1970-01-01
  • 2018-08-24
  • 1970-01-01
  • 1970-01-01
  • 2020-06-26
  • 2012-06-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多