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

bcl*_*ary 8 gdb virtualbox record reverse-debugging

我正在尝试使用gdb的记录功能来生成为教程示例执行的指令列表

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

我想我想做的是"记录指令 - 历史",它来自docs

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

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

当您的目标是"记录已满"时,您无法做到这一点

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

Target不支持分支跟踪.

我在VirtualBox VM中运行gdb 7.6,我是否需要本机运行,或者是否有其他魔法我缺少.

Jea*_*ini 2

VirtualBox您的问题来自于执行此操作本身的问题。正如您在此链接中看到的,更具体地说是在这几行中:

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

这个问题在这里解释一下

But VirtualBox does NOT
emulate certain debugging features of modern x86 CPUs like branch target
store or performance counters.
Run Code Online (Sandbox Code Playgroud)

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

我会继续寻找信息。