- Timestamp:
- Sep 4, 2014 5:07:37 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95872
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Misc/VirtualKD.cpp
r52474 r52597 34 34 *******************************************************************************/ 35 35 36 #define IKDClient_InterfaceVersion 236 #define IKDClient_InterfaceVersion 3 37 37 38 38 … … 60 60 { 61 61 public: 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; 64 63 virtual ~IKDClient() {} 65 64 }; … … 73 72 RTLDRMOD hLib; 74 73 IKDClient *pKDClient; 75 unsigned cbRPCCommandHeaderSize;76 74 char abCmdBody[262144]; 77 75 } VIRTUALKD; … … 104 102 if (Port == 0x5659) 105 103 { 106 VKDREQUESTHDR RequestHeader ;104 VKDREQUESTHDR RequestHeader = {0, }; 107 105 int rc = PDMDevHlpPhysRead(pDevIns, (RTGCPHYS)u32, &RequestHeader, sizeof(RequestHeader)); 108 106 if (!RT_SUCCESS(rc) || !RequestHeader.cbData) … … 114 112 char *pReply = NULL; 115 113 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, 118 116 &pReply); 119 117 … … 158 156 pThis->hLib = NIL_RTLDRMOD; 159 157 pThis->pKDClient = NULL; 160 pThis->cbRPCCommandHeaderSize = 0;161 158 162 159 if (!CFGMR3AreValuesValid(pCfg, … … 205 202 return VINF_SUCCESS; 206 203 } 207 208 pThis->cbRPCCommandHeaderSize = pThis->pKDClient->GetRPCCommandHeaderSize();209 204 210 205 PDMDevHlpIOPortRegister(pDevIns, 0x5658, 2, NULL, vkdPortWrite, vkdPortRead, NULL, NULL, "VirtualKD");
Note:
See TracChangeset
for help on using the changeset viewer.