VirtualBox

Changeset 32812 in vbox for trunk/src


Ignore:
Timestamp:
Sep 29, 2010 11:31:40 AM (14 years ago)
Author:
vboxsync
Message:

VGA: Added debugger command to dump VBE state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r32811 r32812  
    47994799}
    48004800
     4801/**
     4802 * Info handler, device version. Dumps VBE registers.
     4803 *
     4804 * @param   pDevIns     Device instance which registered the info.
     4805 * @param   pHlp        Callback functions for doing output.
     4806 * @param   pszArgs     Argument string. Optional and specific to the handler.
     4807 */
     4808static DECLCALLBACK(void) vgaInfoVBE(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     4809{
     4810    PVGASTATE   s = PDMINS_2_DATA(pDevIns, PVGASTATE);
     4811
     4812    if (!(s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED))
     4813    {
     4814        pHlp->pfnPrintf(pHlp, "VBE disabled\n");
     4815        return;
     4816    }
     4817   
     4818    pHlp->pfnPrintf(pHlp, "VBE state (chip ID 0x%04x):\n", s->vbe_regs[VBE_DISPI_INDEX_ID]);
     4819    pHlp->pfnPrintf(pHlp, " Display resolution: %d x %d @ %dbpp\n",
     4820                    s->vbe_regs[VBE_DISPI_INDEX_XRES], s->vbe_regs[VBE_DISPI_INDEX_YRES],
     4821                    s->vbe_regs[VBE_DISPI_INDEX_BPP]);
     4822    pHlp->pfnPrintf(pHlp, " Virtual resolution: %d x %d\n",
     4823                    s->vbe_regs[VBE_DISPI_INDEX_VIRT_WIDTH], s->vbe_regs[VBE_DISPI_INDEX_VIRT_HEIGHT]);
     4824    pHlp->pfnPrintf(pHlp, " Display start addr: %d, %d\n",
     4825                    s->vbe_regs[VBE_DISPI_INDEX_X_OFFSET], s->vbe_regs[VBE_DISPI_INDEX_Y_OFFSET]);
     4826    pHlp->pfnPrintf(pHlp, " Selected bank: 0x%04x\n", s->vbe_regs[VBE_DISPI_INDEX_BANK]);
     4827}
    48014828
    48024829/* -=-=-=-=-=- Ring 3: IBase -=-=-=-=-=- */
     
    66636690    PDMDevHlpDBGFInfoRegister(pDevIns, "vgaar", "Dump VGA Attribute Controller registers.", vgaInfoAR);
    66646691    PDMDevHlpDBGFInfoRegister(pDevIns, "vgadac", "Dump VGA DAC registers.", vgaInfoDAC);
     6692    PDMDevHlpDBGFInfoRegister(pDevIns, "vbe", "Dump VGA VBE registers.", vgaInfoVBE);
    66656693
    66666694    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette