VirtualBox

Ignore:
Timestamp:
Jul 15, 2010 8:56:09 PM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: more debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r30720 r30865  
    27842784                Status = STATUS_SUCCESS;
    27852785                break;
     2786            case VBOXESC_DBGPRINT:
     2787            {
     2788                /* use RT_OFFSETOF instead of sizeof since sizeof will give an aligned size that might
     2789                 * be bigger than the VBOXDISPIFESCAPE_DBGPRINT with a data containing just a few chars */
     2790                Assert(pEscape->PrivateDriverDataSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]));
     2791                /* only do DbgPrint when pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])
     2792                 * since == RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) means the buffer contains just \0,
     2793                 * i.e. no need to print it */
     2794                if (pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]))
     2795                {
     2796                    PVBOXDISPIFESCAPE_DBGPRINT pDbgPrint = (PVBOXDISPIFESCAPE_DBGPRINT)pEscapeHdr;
     2797                    /* ensure the last char is \0*/
     2798                    *((uint8_t*)pDbgPrint + pEscape->PrivateDriverDataSize - 1) = '\0';
     2799                    DbgPrint(pDbgPrint->aStringBuf);
     2800                }
     2801                Status = STATUS_SUCCESS;
     2802                break;
     2803            }
    27862804            default:
     2805                Assert(0);
    27872806                drprintf((__FUNCTION__": unsupported escape code (0x%x)\n", pEscapeHdr->escapeCode));
    27882807                break;
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