Extract execution log from gdb record in a VirtualBox VM

♀尐吖头ヾ 提交于 2020-01-03 08:08:08

问题


I am attempting to use gdb's record feature to generate a list of the instructions executed for the tutorial example

I can use gdb record to step forward and back successfully and save the execution log to a file using "record save".

I think what I want to do is "record instruction-history" which from docs

Disassembles instructions from the recorded execution log

But when I attempt this i get the error:

You can't do that when your target is 'record-full'

Attempting to set the record target to btrace returns the error:

Target does not support branch tracing.

I am running gdb 7.6 in a VirtualBox VM, do i need to be running natively or is there some other magic i'm missing.


回答1:


Your problem comes from a problem on VirtualBox itself to perform this operation. As you can see in this link, more specifically in this lines:

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

This problem is explained here.

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

My best guess is to install some other VirtualBox features that allow you to perform such operations, or switch to a new virtual environment.

I'll keep searching for information.



来源:https://stackoverflow.com/questions/16991582/extract-execution-log-from-gdb-record-in-a-virtualbox-vm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!