VirtualBox

Changeset 41667 in vbox


Ignore:
Timestamp:
Jun 12, 2012 12:00:37 PM (13 years ago)
Author:
vboxsync
Message:

Compacted CMOS debug info output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevRTC.cpp

    r41599 r41667  
    288288{
    289289    RTCState *pThis = PDMINS_2_DATA(pDevIns, RTCState *);
    290     const char *PChCMOSBank = "CMOS Bank Info 0x0E - 0x7F";
    291290    uint16_t u16ByteCount = 0;
    292     uint8_t   u8CMOSByte;
    293     pHlp->pfnPrintf(pHlp, "%s\n" ,PChCMOSBank);
    294     for (u16ByteCount = CMOS_BANK_LOWER_LIMIT; u16ByteCount < CMOS_BANK_UPPER_LIMIT; u16ByteCount++)
    295     {
    296         u8CMOSByte  =  pThis->cmos_data[u16ByteCount];
    297         pHlp->pfnPrintf(pHlp, "Off: 0x%02x Val: 0x%02x\n",u16ByteCount, u8CMOSByte);
    298     }
     291
     292    pHlp->pfnPrintf(pHlp, "First CMOS bank, offsets 0x0E - 0x7F");
     293    pHlp->pfnPrintf(pHlp, "\nOffset %02x : --- use 'info rtc' to show CMOS clock ---", 0);
     294    for (u16ByteCount = CMOS_BANK_LOWER_LIMIT; u16ByteCount <= CMOS_BANK_UPPER_LIMIT; u16ByteCount++)
     295    {
     296        if ((u16ByteCount & 15) == 0) {
     297            pHlp->pfnPrintf(pHlp, "\nOffset %02x : ", u16ByteCount);
     298        } else if ((u16ByteCount & 15) == 8) {
     299            pHlp->pfnPrintf(pHlp, "-");
     300        } else {
     301            pHlp->pfnPrintf(pHlp, " ");
     302        }
     303        pHlp->pfnPrintf(pHlp, "%02x", pThis->cmos_data[u16ByteCount]);
     304    }
     305    pHlp->pfnPrintf(pHlp, "\n");
    299306}
    300307
     
    306313{
    307314    RTCState *pThis = PDMINS_2_DATA(pDevIns, RTCState *);
    308     const char *PChCMOSBank = "CMOS Bank2 Info 0x80 - 0xFF";
    309315    uint16_t u16ByteCount = 0;
    310     uint8_t   u8CMOSByte;
    311     pHlp->pfnPrintf(pHlp, "%s\n" ,PChCMOSBank);
    312     for (u16ByteCount = CMOS_BANK2_LOWER_LIMIT; u16ByteCount < CMOS_BANK2_UPPER_LIMIT; u16ByteCount++)
    313     {
    314         u8CMOSByte  =  pThis->cmos_data[u16ByteCount];
    315         pHlp->pfnPrintf(pHlp, "Off: 0x%02x Val: 0x%02x\n",u16ByteCount, u8CMOSByte);
    316     }
     316
     317    pHlp->pfnPrintf(pHlp, "Second CMOS bank, offsets 0x80 - 0xFF");
     318    for (u16ByteCount = CMOS_BANK2_LOWER_LIMIT; u16ByteCount <= CMOS_BANK2_UPPER_LIMIT; u16ByteCount++)
     319    {
     320        if ((u16ByteCount & 15) == 0) {
     321            pHlp->pfnPrintf(pHlp, "\nOffset %02x : ", u16ByteCount);
     322        } else if ((u16ByteCount & 15) == 8) {
     323            pHlp->pfnPrintf(pHlp, "-");
     324        } else {
     325            pHlp->pfnPrintf(pHlp, " ");
     326        }
     327        pHlp->pfnPrintf(pHlp, "%02x", pThis->cmos_data[u16ByteCount]);
     328    }
     329    pHlp->pfnPrintf(pHlp, "\n");
    317330}
    318331
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