VirtualBox

Changeset 46428 in vbox


Ignore:
Timestamp:
Jun 7, 2013 8:26:18 AM (12 years ago)
Author:
vboxsync
Message:

VBoxTray/VBoxGuest: better caps tracking logging

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r46196 r46428  
    14371437    DWORD cbReturned = 0;
    14381438    VBoxGuestCapsAquire Info;
     1439    Log(("VBoxTray: VBoxAcquireGuestCaps or(0x%x), not(0x%x), cfx(%d)\n", fOr, fNot, fCfg));
    14391440    Info.enmFlags = fCfg ? VBOXGUESTCAPSACQUIRE_FLAGS_CONFIG_ACQUIRE_MODE : VBOXGUESTCAPSACQUIRE_FLAGS_NONE;
    14401441    Info.rc = VERR_NOT_IMPLEMENTED;
     
    14441445    {
    14451446        DWORD LastErr = GetLastError();
    1446         WARN(("DeviceIoControl VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE failed LastErr %d\n", LastErr));
     1447        WARN(("VBoxTray: DeviceIoControl VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE failed LastErr %d\n", LastErr));
    14471448        return RTErrConvertFromWin32(LastErr);
    14481449    }
     
    14511452    if (!RT_SUCCESS(rc))
    14521453    {
    1453         WARN(("VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE failed rc %d\n", rc));
     1454        WARN(("VBoxTray: VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE failed rc %d\n", rc));
    14541455        return rc;
    14551456    }
     
    14961497    if (fEnabled)
    14971498    {
     1499        Log(("VBoxTray: vboxCapsOnEnableSeamles: ENABLED\n"));
    14981500        Assert(pCap->enmAcState == VBOXCAPS_ENTRY_ACSTATE_ACQUIRED);
    14991501        Assert(pCap->enmFuncState == VBOXCAPS_ENTRY_FUNCSTATE_STARTED);
     
    15021504    else
    15031505    {
     1506        Log(("VBoxTray: vboxCapsOnEnableSeamles: DISABLED\n"));
    15041507        Assert(pCap->enmAcState != VBOXCAPS_ENTRY_ACSTATE_ACQUIRED || pCap->enmFuncState != VBOXCAPS_ENTRY_FUNCSTATE_STARTED);
    15051508        VBoxSeamlessRemoveHook();
     
    15101513{
    15111514    VBOXCAPS *pConsole = &gVBoxCaps;
     1515
     1516    Log(("VBoxTray: vboxCapsEntryAcStateSet: new state enmAcState(%d); pCap: fCap(%d), iCap(%d), enmFuncState(%d), enmAcState(%d)\n",
     1517            enmAcState, pCap->fCap, pCap->iCap, pCap->enmFuncState, pCap->enmAcState));
     1518
    15121519    if (pCap->enmAcState == enmAcState)
    15131520        return;
     
    15341541{
    15351542    VBOXCAPS *pConsole = &gVBoxCaps;
     1543
     1544    Log(("VBoxTray: vboxCapsEntryFuncStateSet: new state enmAcState(%d); pCap: fCap(%d), iCap(%d), enmFuncState(%d), enmAcState(%d)\n",
     1545            enmFuncState, pCap->fCap, pCap->iCap, pCap->enmFuncState, pCap->enmAcState));
     1546
    15361547    if (pCap->enmFuncState == enmFuncState)
    15371548        return;
     
    15791590{
    15801591    VBOXCAPS *pConsole = &gVBoxCaps;
     1592    Log(("VBoxTray: VBoxCapsReleaseAll\n"));
    15811593    int rc = VBoxAcquireGuestCaps(0, VMMDEV_GUEST_SUPPORTS_SEAMLESS | VMMDEV_GUEST_SUPPORTS_GRAPHICS, false);
    15821594    if (!RT_SUCCESS(rc))
     
    15881600    if (pConsole->idTimer)
    15891601    {
     1602        Log(("VBoxTray: killing console timer\n"));
    15901603        KillTimer(ghwndToolWindow, pConsole->idTimer);
    15911604        pConsole->idTimer = 0;
     
    16641677    if (pCap->enmAcState == VBOXCAPS_ENTRY_ACSTATE_RELEASED)
    16651678    {
    1666         WARN(("invalid cap[%d] state[%d] on release\n", iCap, pCap->enmAcState));
     1679        WARN(("VBoxTray: invalid cap[%d] state[%d] on release\n", iCap, pCap->enmAcState));
    16671680        return VERR_INVALID_STATE;
    16681681    }
     
    16841697    Assert(VBoxConsoleIsAllowed());
    16851698    VBOXCAPS_ENTRY *pCap = &pConsole->aCaps[iCap];
     1699    Log(("VBoxTray: VBoxCapsEntryAcquire %d\n", iCap));
    16861700    if (pCap->enmAcState != VBOXCAPS_ENTRY_ACSTATE_RELEASED)
    16871701    {
    1688         WARN(("invalid cap[%d] state[%d] on acquire\n", iCap, pCap->enmAcState));
     1702        WARN(("VBoxTray: invalid cap[%d] state[%d] on acquire\n", iCap, pCap->enmAcState));
    16891703        return VERR_INVALID_STATE;
    16901704    }
     
    17251739{
    17261740    VBOXCAPS *pConsole = &gVBoxCaps;
     1741    Log(("VBoxTray: VBoxCapsAcquireAllSupported\n"));
    17271742    for (int i = 0; i < RT_ELEMENTS(pConsole->aCaps); ++i)
    17281743    {
    17291744        if (pConsole->aCaps[i].enmFuncState >= VBOXCAPS_ENTRY_FUNCSTATE_SUPPORTED)
     1745        {
     1746            Log(("VBoxTray: VBoxCapsAcquireAllSupported acquiring cap %d, state %d\n", i, pConsole->aCaps[i].enmFuncState));
    17301747            VBoxCapsEntryAcquire(i);
     1748        }
     1749        else
     1750        {
     1751            WARN(("VBoxTray: VBoxCapsAcquireAllSupported: WARN: cap %d not supported, state %d\n", i, pConsole->aCaps[i].enmFuncState));
     1752        }
    17311753    }
    17321754    return VINF_SUCCESS;
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r46196 r46428  
    25442544    uint32_t fSetCaps = 0;
    25452545
     2546    LogRel(("VBoxGuest: VBoxGuestCommonGuestCapsAcquire: pSession(0x%p), OR(0x%x), NOT(0x%x), flags(0x%x)\n", pSession, fOrMask, fNotMask, enmFlags));
     2547
    25462548    if (!VBoxGuestCommonGuestCapsValidateValues(fOrMask))
    25472549    {
     
    26182620    if (!RT_SUCCESS(rc))
    26192621    {
     2622        LogRel(("VBoxGuest: VBoxGuestCommonGuestCapsAcquire: VBoxGuestSetGuestCapabilities failed, rc %d\n", rc));
     2623
    26202624        /* Failure branch
    26212625         * this is generally bad since e.g. failure to release the caps may result in other sessions not being able to use it
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