[vbox-dev] Question about debugging VirtualBox
liqsub at 163.com
Tue Jun 6 08:29:42 UTC 2017
I have a question about debuging VirtualBox in Linux environment.
It seems the breakpoint doesn't got been hit.
First I compile a debug version of VirtualBox.
1. start a vm: sudo gdb --args ./VirtualBox --comment ubuntu --startvm a3af2e12-957b-48a8-8b0c-1afe93fe2d2c --no-startvm-errormsgbox
2. set break point. For example:
3. in the guest, we trigger an IO access.
4. In my mind, I think this will break at vpciIOPortOut function. But it doesn't, the vm just run without break.
5. But as I change the outw to outl/outb.(This will make the 'cb' to be 1 or 4. The VM will crash.
This crash is caused by following Assert in vpciIOPortOut function.
Assert(cb == 2);
u32 &= 0xFFFF;
if (u32 < pState->nQueues)
pState->uQueueSelector = u32;
Log3(("%s vpciIOPortOut: Invalid queue selector %08x\n", INSTANCE(pState), u32));
So here I think outb/w/l in guest does TRIGGER the call of vpciIOPortOut function. But why does the vm not pause and goto gdb? Is there something I missed?
Li Qiang /the Gear Team, Qihoo 360 Inc
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev