从VirtualBox VM中的gdb记录中提取执行日志

时间:2013-06-07 19:27:37

标签: gdb virtualbox record reverse-debugging

我正在尝试使用gdb的记录功能来生成为tutorial example

执行的指令列表

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

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

  

从记录的执行日志

中反汇编指令

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

  

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

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

  

目标不支持分支跟踪。

我在VirtualBox VM中运行gdb 7.6,我是否需要本地运行,或者是否有其他魔法我缺席。

1 个答案:

答案 0 :(得分:2)

您的问题来自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功能,允许您执行此类操作,或切换到新的虚拟环境。

我会继续搜索信息。