VirtualBox

Changeset 52597 in vbox for trunk/src


Ignore:
Timestamp:
Sep 4, 2014 5:07:37 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95872
Message:

Devices/Misc/VirtualKD: new, slightly modified interface definition which avoids the need to know the rpc command header size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Misc/VirtualKD.cpp

    r52474 r52597  
    3434*******************************************************************************/
    3535
    36 #define IKDClient_InterfaceVersion 2
     36#define IKDClient_InterfaceVersion 3
    3737
    3838
     
    6060{
    6161public:
    62     virtual unsigned OnRequest(const char *pRequest, unsigned RequestSize, char **ppReply)=0;
    63     virtual unsigned GetRPCCommandHeaderSize()=0;
     62    virtual unsigned OnRequest(const char *pRequestIncludingRpcHeader, unsigned RequestSizeWithRpcHeader, char **ppReply)=0;
    6463    virtual ~IKDClient() {}
    6564};
     
    7372    RTLDRMOD hLib;
    7473    IKDClient *pKDClient;
    75     unsigned cbRPCCommandHeaderSize;
    7674    char abCmdBody[262144];
    7775} VIRTUALKD;
     
    104102    if (Port == 0x5659)
    105103    {
    106         VKDREQUESTHDR RequestHeader;
     104        VKDREQUESTHDR RequestHeader = {0, };
    107105        int rc = PDMDevHlpPhysRead(pDevIns, (RTGCPHYS)u32, &RequestHeader, sizeof(RequestHeader));
    108106        if (!RT_SUCCESS(rc) || !RequestHeader.cbData)
     
    114112        char *pReply = NULL;
    115113        unsigned cbReply;
    116         cbReply = pThis->pKDClient->OnRequest(pThis->abCmdBody + pThis->cbRPCCommandHeaderSize,
    117                                               RequestHeader.cbData - pThis->cbRPCCommandHeaderSize,
     114        cbReply = pThis->pKDClient->OnRequest(pThis->abCmdBody,
     115                                              RequestHeader.cbData,
    118116                                              &pReply);
    119117
     
    158156    pThis->hLib = NIL_RTLDRMOD;
    159157    pThis->pKDClient = NULL;
    160     pThis->cbRPCCommandHeaderSize = 0;
    161158
    162159    if (!CFGMR3AreValuesValid(pCfg,
     
    205202        return VINF_SUCCESS;
    206203    }
    207 
    208     pThis->cbRPCCommandHeaderSize = pThis->pKDClient->GetRPCCommandHeaderSize();
    209204
    210205    PDMDevHlpIOPortRegister(pDevIns, 0x5658, 2, NULL, vkdPortWrite, vkdPortRead, NULL, NULL, "VirtualKD");
Note: See TracChangeset for help on using the changeset viewer.

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