Hello all,

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:

b vpciIOPortOut

3. in the guest, we trigger an IO access.
outw(1,0xd020+0xe)

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.

        case VPCI_QUEUE_SEL:
            Assert(cb == 2);
            u32 &= 0xFFFF;
            if (u32 < pState->nQueues)
                pState->uQueueSelector = u32;
            else
                Log3(("%s vpciIOPortOut: Invalid queue selector %08x\n", 
INSTANCE(pState), u32));
            break;

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?

Thanks.

--
Li Qiang /the Gear Team, Qihoo 360 Inc
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to