Changeset 86327 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Sep 28, 2020 4:20:50 PM (4 years ago)
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 4 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
r86098 r86327 401 401 DECLINLINE(int) dbgcGdbStubCtxWrite(PGDBSTUBCTX pThis, const void *pvPkt, size_t cbPkt) 402 402 { 403 return pThis->Dbgc.p Back->pfnWrite(pThis->Dbgc.pBack, pvPkt, cbPkt, NULL /*pcbWritten*/);403 return pThis->Dbgc.pIo->pfnWrite(pThis->Dbgc.pIo, pvPkt, cbPkt, NULL /*pcbWritten*/); 404 404 } 405 405 … … 2328 2328 { 2329 2329 size_t cbThisRead = 32; 2330 rc = pThis->Dbgc.p Back->pfnRead(pThis->Dbgc.pBack, &pThis->pbPktBuf[pThis->offPktBuf], cbThisRead, &cbThisRead);2330 rc = pThis->Dbgc.pIo->pfnRead(pThis->Dbgc.pIo, &pThis->pbPktBuf[pThis->offPktBuf], cbThisRead, &cbThisRead); 2331 2331 if (RT_SUCCESS(rc)) 2332 2332 rc = dbgcGdbStubCtxPktBufProcess(pThis, cbThisRead); … … 2470 2470 { 2471 2471 pThis->Dbgc.fReady = false; 2472 pThis->Dbgc.p Back->pfnSetReady(pThis->Dbgc.pBack, false);2472 pThis->Dbgc.pIo->pfnSetReady(pThis->Dbgc.pIo, false); 2473 2473 rc = VERR_GENERAL_FAILURE; 2474 2474 break; … … 2568 2568 */ 2569 2569 pThis->Dbgc.fReady = true; 2570 pThis->Dbgc.p Back->pfnSetReady(pThis->Dbgc.pBack, true);2570 pThis->Dbgc.pIo->pfnSetReady(pThis->Dbgc.pIo, true); 2571 2571 2572 2572 /* … … 2603 2603 * Check for input. 2604 2604 */ 2605 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, 0))2605 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, 0)) 2606 2606 { 2607 2607 rc = dbgcGdbStubCtxRecv(pThis); … … 2615 2615 * Wait for input. 2616 2616 */ 2617 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, 1000))2617 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, 1000)) 2618 2618 { 2619 2619 rc = dbgcGdbStubCtxRecv(pThis); … … 2675 2675 * @returns VBox status code. 2676 2676 * @param ppGdbStubCtx Where to store the pointer to the GDB stub context instance on success. 2677 * @param p Back The backend to use for I/O.2677 * @param pIo Pointer to the I/O callback table. 2678 2678 * @param fFlags Flags controlling the behavior. 2679 2679 */ 2680 static int dbgcGdbStubCtxCreate(PPGDBSTUBCTX ppGdbStubCtx, P DBGCBACK pBack, unsigned fFlags)2680 static int dbgcGdbStubCtxCreate(PPGDBSTUBCTX ppGdbStubCtx, PCDBGCIO pIo, unsigned fFlags) 2681 2681 { 2682 2682 /* 2683 2683 * Validate input. 2684 2684 */ 2685 AssertPtrReturn(p Back, VERR_INVALID_POINTER);2685 AssertPtrReturn(pIo, VERR_INVALID_POINTER); 2686 2686 AssertMsgReturn(!fFlags, ("%#x", fFlags), VERR_INVALID_PARAMETER); 2687 2687 … … 2698 2698 * in DBGCConsole.cpp. Try to keep both functions in sync. 2699 2699 */ 2700 pThis->Dbgc.p Back = pBack;2700 pThis->Dbgc.pIo = pIo; 2701 2701 pThis->Dbgc.pfnOutput = dbgcOutputGdb; 2702 2702 pThis->Dbgc.pvOutputUser = pThis; … … 2791 2791 2792 2792 2793 DECL HIDDEN(int) dbgcGdbStubCreate(PUVM pUVM, PDBGCBACK pBack, unsigned fFlags)2793 DECL_HIDDEN_CALLBACK(int) dbgcGdbStubRunloop(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags) 2794 2794 { 2795 2795 /* … … 2808 2808 */ 2809 2809 PGDBSTUBCTX pThis; 2810 int rc = dbgcGdbStubCtxCreate(&pThis, p Back, fFlags);2810 int rc = dbgcGdbStubCtxCreate(&pThis, pIo, fFlags); 2811 2811 if (RT_FAILURE(rc)) 2812 2812 return rc; -
trunk/src/VBox/Debugger/DBGCInternal.h
r86105 r86327 114 114 /** Wrappers for DBGF output. */ 115 115 DBGFINFOHLP DbgfOutputHlp; 116 /** Pointer to backendcallback structure. */117 P DBGCBACK pBack;116 /** Pointer to I/O callback structure. */ 117 PCDBGCIO pIo; 118 118 119 119 /** … … 594 594 595 595 /* For tstDBGCParser: */ 596 int dbgcCreate(PDBGC *ppDbgc, P DBGCBACK pBack, unsigned fFlags);596 int dbgcCreate(PDBGC *ppDbgc, PCDBGCIO pIo, unsigned fFlags); 597 597 int dbgcRun(PDBGC pDbgc); 598 598 int dbgcProcessInput(PDBGC pDbgc, bool fNoExecute); … … 602 602 DECLHIDDEN(PCDBGCSXEVT) dbgcEventLookup(DBGFEVENTTYPE enmType); 603 603 604 DECL HIDDEN(int) dbgcGdbStubCreate(PUVM pUVM, PDBGCBACK pBack, unsigned fFlags);605 DECL HIDDEN(int) dbgcKdStubCreate(PUVM pUVM, PDBGCBACK pBack, unsigned fFlags);604 DECL_HIDDEN_CALLBACK(int) dbgcGdbStubRunloop(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags); 605 DECL_HIDDEN_CALLBACK(int) dbgcKdStubRunloop(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags); 606 606 607 607 -
trunk/src/VBox/Debugger/DBGCRemoteKd.cpp
r86246 r86327 1736 1736 DECLINLINE(int) dbgcKdCtxWrite(PKDCTX pThis, const void *pvPkt, size_t cbPkt) 1737 1737 { 1738 return pThis->Dbgc.p Back->pfnWrite(pThis->Dbgc.pBack, pvPkt, cbPkt, NULL /*pcbWritten*/);1738 return pThis->Dbgc.pIo->pfnWrite(pThis->Dbgc.pIo, pvPkt, cbPkt, NULL /*pcbWritten*/); 1739 1739 } 1740 1740 … … 2293 2293 && RT_SUCCESS(rc)) 2294 2294 { 2295 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, msWait))2295 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, msWait)) 2296 2296 { 2297 2297 size_t cbRead = 0; 2298 rc = pThis->Dbgc.p Back->pfnRead(pThis->Dbgc.pBack, pbCur, 1, &cbRead);2298 rc = pThis->Dbgc.pIo->pfnRead(pThis->Dbgc.pIo, pbCur, 1, &cbRead); 2299 2299 if ( RT_SUCCESS(rc) 2300 2300 && cbRead == 1) … … 2328 2328 && cbLeft) 2329 2329 { 2330 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, msWait))2330 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, msWait)) 2331 2331 { 2332 2332 size_t cbRead = 0; 2333 rc = pThis->Dbgc.p Back->pfnRead(pThis->Dbgc.pBack, pbCur, cbLeft, &cbRead);2333 rc = pThis->Dbgc.pIo->pfnRead(pThis->Dbgc.pIo, pbCur, cbLeft, &cbRead); 2334 2334 if (RT_SUCCESS(rc)) 2335 2335 { … … 3855 3855 { 3856 3856 size_t cbRead = 0; 3857 rc = pThis->Dbgc.p Back->pfnRead(pThis->Dbgc.pBack, pThis->pbRecv, pThis->cbRecvLeft, &cbRead);3857 rc = pThis->Dbgc.pIo->pfnRead(pThis->Dbgc.pIo, pThis->pbRecv, pThis->cbRecvLeft, &cbRead); 3858 3858 if (RT_SUCCESS(rc)) 3859 3859 { … … 4016 4016 { 4017 4017 pThis->Dbgc.fReady = false; 4018 pThis->Dbgc.p Back->pfnSetReady(pThis->Dbgc.pBack, false);4018 pThis->Dbgc.pIo->pfnSetReady(pThis->Dbgc.pIo, false); 4019 4019 rc = VERR_GENERAL_FAILURE; 4020 4020 break; … … 4141 4141 */ 4142 4142 pThis->Dbgc.fReady = true; 4143 pThis->Dbgc.p Back->pfnSetReady(pThis->Dbgc.pBack, true);4143 pThis->Dbgc.pIo->pfnSetReady(pThis->Dbgc.pIo, true); 4144 4144 4145 4145 /* … … 4176 4176 * Check for input. 4177 4177 */ 4178 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, 0))4178 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, 0)) 4179 4179 { 4180 4180 rc = dbgcKdCtxRecv(pThis); … … 4188 4188 * Wait for input. 4189 4189 */ 4190 if (pThis->Dbgc.p Back->pfnInput(pThis->Dbgc.pBack, 1000))4190 if (pThis->Dbgc.pIo->pfnInput(pThis->Dbgc.pIo, 1000)) 4191 4191 { 4192 4192 rc = dbgcKdCtxRecv(pThis); … … 4211 4211 * @returns VBox status code. 4212 4212 * @param ppKdCtx Where to store the pointer to the KD stub context instance on success. 4213 * @param p Back The backend to use for I/O.4213 * @param pIo Pointer to the I/O callback table. 4214 4214 * @param fFlags Flags controlling the behavior. 4215 4215 */ 4216 static int dbgcKdCtxCreate(PPKDCTX ppKdCtx, P DBGCBACK pBack, unsigned fFlags)4216 static int dbgcKdCtxCreate(PPKDCTX ppKdCtx, PCDBGCIO pIo, unsigned fFlags) 4217 4217 { 4218 4218 /* 4219 4219 * Validate input. 4220 4220 */ 4221 AssertPtrReturn(p Back, VERR_INVALID_POINTER);4221 AssertPtrReturn(pIo, VERR_INVALID_POINTER); 4222 4222 AssertMsgReturn(!fFlags, ("%#x", fFlags), VERR_INVALID_PARAMETER); 4223 4223 … … 4234 4234 * in DBGCConsole.cpp. Try to keep both functions in sync. 4235 4235 */ 4236 pThis->Dbgc.p Back = pBack;4236 pThis->Dbgc.pIo = pIo; 4237 4237 pThis->Dbgc.pfnOutput = dbgcKdOutput; 4238 4238 pThis->Dbgc.pvOutputUser = pThis; … … 4332 4332 4333 4333 4334 DECL HIDDEN(int) dbgcKdStubCreate(PUVM pUVM, PDBGCBACK pBack, unsigned fFlags)4334 DECL_HIDDEN_CALLBACK(int) dbgcKdStubRunloop(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags) 4335 4335 { 4336 4336 /* … … 4349 4349 */ 4350 4350 PKDCTX pThis; 4351 int rc = dbgcKdCtxCreate(&pThis, p Back, fFlags);4351 int rc = dbgcKdCtxCreate(&pThis, pIo, fFlags); 4352 4352 if (RT_FAILURE(rc)) 4353 4353 return rc; -
trunk/src/VBox/Debugger/DBGConsole.cpp
r86105 r86327 410 410 * When finding a '\n' we'll continue normal processing. 411 411 */ 412 while (pDbgc->p Back->pfnInput(pDbgc->pBack, 0))412 while (pDbgc->pIo->pfnInput(pDbgc->pIo, 0)) 413 413 { 414 414 size_t cbRead; 415 int rc = pDbgc->p Back->pfnRead(pDbgc->pBack, &pDbgc->achInput[0], sizeof(pDbgc->achInput) - 1, &cbRead);415 int rc = pDbgc->pIo->pfnRead(pDbgc->pIo, &pDbgc->achInput[0], sizeof(pDbgc->achInput) - 1, &cbRead); 416 416 if (RT_FAILURE(rc)) 417 417 return rc; … … 469 469 char achRead[128]; 470 470 size_t cbRead; 471 rc = pDbgc->p Back->pfnRead(pDbgc->pBack, &achRead[0], RT_MIN(cbLeft, sizeof(achRead)), &cbRead);471 rc = pDbgc->pIo->pfnRead(pDbgc->pIo, &achRead[0], RT_MIN(cbLeft, sizeof(achRead)), &cbRead); 472 472 if (RT_FAILURE(rc)) 473 473 return rc; … … 527 527 /* Terminate it to make it easier to read in the debugger. */ 528 528 pDbgc->achInput[pDbgc->iWrite] = '\0'; 529 } while (pDbgc->p Back->pfnInput(pDbgc->pBack, 0));529 } while (pDbgc->pIo->pfnInput(pDbgc->pIo, 0)); 530 530 531 531 return rc; … … 554 554 if (pDbgc->cInputLines) 555 555 { 556 pDbgc->p Back->pfnSetReady(pDbgc->pBack, false);556 pDbgc->pIo->pfnSetReady(pDbgc->pIo, false); 557 557 pDbgc->fReady = false; 558 558 rc = dbgcProcessCommands(pDbgc, fNoExecute); … … 567 567 if ( RT_SUCCESS(rc) 568 568 && pDbgc->fReady) 569 pDbgc->p Back->pfnSetReady(pDbgc->pBack, true);569 pDbgc->pIo->pfnSetReady(pDbgc->pIo, true); 570 570 } 571 571 /* … … 810 810 { 811 811 pDbgc->fReady = false; 812 pDbgc->p Back->pfnSetReady(pDbgc->pBack, false);812 pDbgc->pIo->pfnSetReady(pDbgc->pIo, false); 813 813 pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\nVM is powering off!\n"); 814 814 fPrintPrompt = false; … … 890 890 pDbgc->fReady = true; 891 891 if (RT_SUCCESS(rc)) 892 pDbgc->p Back->pfnSetReady(pDbgc->pBack, true);892 pDbgc->pIo->pfnSetReady(pDbgc->pIo, true); 893 893 pDbgc->cMultiStepsLeft = 0; 894 894 } … … 935 935 */ 936 936 pDbgc->fReady = true; 937 pDbgc->p Back->pfnSetReady(pDbgc->pBack, true);937 pDbgc->pIo->pfnSetReady(pDbgc->pIo, true); 938 938 939 939 /* … … 970 970 * Check for input. 971 971 */ 972 if (pDbgc->p Back->pfnInput(pDbgc->pBack, 0))972 if (pDbgc->pIo->pfnInput(pDbgc->pIo, 0)) 973 973 { 974 974 rc = dbgcProcessInput(pDbgc, false /* fNoExecute */); … … 982 982 * Wait for input. If Logging is enabled we'll only wait very briefly. 983 983 */ 984 if (pDbgc->p Back->pfnInput(pDbgc->pBack, pDbgc->fLog ? 1 : 1000))984 if (pDbgc->pIo->pfnInput(pDbgc->pIo, pDbgc->fLog ? 1 : 1000)) 985 985 { 986 986 rc = dbgcProcessInput(pDbgc, false /* fNoExecute */); … … 1052 1052 "HistoryFile|" 1053 1053 "LocalInitScript|" 1054 "GlobalInitScript|" 1055 "StubType", 1056 "", "DBGC", 0); 1054 "GlobalInitScript|", 1055 "*", "DBGC", 0); 1057 1056 AssertRCReturn(rc, rc); 1058 1057 … … 1113 1112 { 1114 1113 PDBGC pDbgc = (PDBGC)pvUser; 1115 return pDbgc->p Back->pfnWrite(pDbgc->pBack, pachChars, cbChars, NULL /*pcbWritten*/);1114 return pDbgc->pIo->pfnWrite(pDbgc->pIo, pachChars, cbChars, NULL /*pcbWritten*/); 1116 1115 } 1117 1116 … … 1122 1121 * @returns VBox status code. 1123 1122 * @param ppDbgc Where to store the pointer to the instance data. 1124 * @param p Back Pointer to the backend.1123 * @param pIo Pointer to the I/O callback table. 1125 1124 * @param fFlags The flags. 1126 1125 */ 1127 int dbgcCreate(PDBGC *ppDbgc, P DBGCBACK pBack, unsigned fFlags)1126 int dbgcCreate(PDBGC *ppDbgc, PCDBGCIO pIo, unsigned fFlags) 1128 1127 { 1129 1128 /* 1130 1129 * Validate input. 1131 1130 */ 1132 AssertPtrReturn(p Back, VERR_INVALID_POINTER);1131 AssertPtrReturn(pIo, VERR_INVALID_POINTER); 1133 1132 AssertMsgReturn(!fFlags, ("%#x", fFlags), VERR_INVALID_PARAMETER); 1134 1133 … … 1141 1140 1142 1141 dbgcInitCmdHlp(pDbgc); 1143 pDbgc->p Back = pBack;1142 pDbgc->pIo = pIo; 1144 1143 pDbgc->pfnOutput = dbgcOutputNative; 1145 1144 pDbgc->pvOutputUser = pDbgc; … … 1236 1235 * 1237 1236 * @param pUVM The user mode VM handle. 1238 * @param p Back Pointer to the backendstructure. This must contain1237 * @param pIo Pointer to the I/O callback structure. This must contain 1239 1238 * a full set of function pointers to service the console. 1240 1239 * @param fFlags Reserved, must be zero. … … 1242 1241 * callbacks to return fatal failures. 1243 1242 */ 1244 DBGDECL(int) DBGCCreate(PUVM pUVM, P DBGCBACK pBack, unsigned fFlags)1243 DBGDECL(int) DBGCCreate(PUVM pUVM, PCDBGCIO pIo, unsigned fFlags) 1245 1244 { 1246 1245 /* … … 1259 1258 */ 1260 1259 PDBGC pDbgc; 1261 int rc = dbgcCreate(&pDbgc, p Back, fFlags);1260 int rc = dbgcCreate(&pDbgc, pIo, fFlags); 1262 1261 if (RT_FAILURE(rc)) 1263 1262 return rc; -
trunk/src/VBox/Debugger/Makefile.kmk
r86105 r86327 51 51 DBGCGdbRemoteStub.cpp \ 52 52 DBGCRemoteKd.cpp \ 53 DBGCTcp.cpp \ 53 DBGCIo.cpp \ 54 DBGCIoProvTcp.cpp \ 55 DBGCIoProvIpc.cpp \ 54 56 DBGCScreenAscii.cpp 55 57 -
trunk/src/VBox/Debugger/VBoxDbgBase.cpp
r85844 r86327 96 96 97 97 int 98 VBoxDbgBase::dbgcCreate(P DBGCBACK pBack, unsigned fFlags)98 VBoxDbgBase::dbgcCreate(PCDBGCIO pIo, unsigned fFlags) 99 99 { 100 100 PUVM pUVM = m_pUVM; 101 101 if ( pUVM 102 102 && VMR3GetStateU(pUVM) < VMSTATE_DESTROYING) 103 return DBGCCreate(pUVM, p Back, fFlags);103 return DBGCCreate(pUVM, pIo, fFlags); 104 104 return VERR_INVALID_HANDLE; 105 105 } -
trunk/src/VBox/Debugger/VBoxDbgBase.h
r82968 r86327 87 87 * Wrapper for DBGCCreate(). 88 88 */ 89 int dbgcCreate(P DBGCBACK pBack, unsigned fFlags);89 int dbgcCreate(PCDBGCIO pIo, unsigned fFlags); 90 90 /** @} */ 91 91 -
trunk/src/VBox/Debugger/VBoxDbgConsole.cpp
r86004 r86327 740 740 */ 741 741 /*static*/ DECLCALLBACK(bool) 742 VBoxDbgConsole::backInput(P DBGCBACKpBack, uint32_t cMillies)743 { 744 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGC BACK(pBack);742 VBoxDbgConsole::backInput(PCDBGCIO pBack, uint32_t cMillies) 743 { 744 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGCIO(pBack); 745 745 pThis->lock(); 746 746 … … 775 775 */ 776 776 /*static*/ DECLCALLBACK(int) 777 VBoxDbgConsole::backRead(P DBGCBACKpBack, void *pvBuf, size_t cbBuf, size_t *pcbRead)778 { 779 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGC BACK(pBack);777 VBoxDbgConsole::backRead(PCDBGCIO pBack, void *pvBuf, size_t cbBuf, size_t *pcbRead) 778 { 779 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGCIO(pBack); 780 780 Assert(pcbRead); /** @todo implement this bit */ 781 781 if (pcbRead) … … 817 817 */ 818 818 /*static*/ DECLCALLBACK(int) 819 VBoxDbgConsole::backWrite(P DBGCBACKpBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten)820 { 821 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGC BACK(pBack);819 VBoxDbgConsole::backWrite(PCDBGCIO pBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten) 820 { 821 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGCIO(pBack); 822 822 int rc = VINF_SUCCESS; 823 823 … … 864 864 865 865 /*static*/ DECLCALLBACK(void) 866 VBoxDbgConsole::backSetReady(P DBGCBACKpBack, bool fReady)867 { 868 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGC BACK(pBack);866 VBoxDbgConsole::backSetReady(PCDBGCIO pBack, bool fReady) 867 { 868 VBoxDbgConsole *pThis = VBOXDBGCONSOLE_FROM_DBGCIO(pBack); 869 869 if (fReady) 870 870 QApplication::postEvent(pThis, new VBoxDbgConsoleEvent(VBoxDbgConsoleEvent::kInputEnable)); -
trunk/src/VBox/Debugger/VBoxDbgConsole.h
r82968 r86327 289 289 * @param cMillies Number of milliseconds to wait on input data. 290 290 */ 291 static DECLCALLBACK(bool) backInput(P DBGCBACK pBack, uint32_t cMillies);291 static DECLCALLBACK(bool) backInput(PCDBGCIO pIo, uint32_t cMillies); 292 292 293 293 /** … … 302 302 * successful return. 303 303 */ 304 static DECLCALLBACK(int) backRead(P DBGCBACK pBack, void *pvBuf, size_t cbBuf, size_t *pcbRead);304 static DECLCALLBACK(int) backRead(PCDBGCIO pIo, void *pvBuf, size_t cbBuf, size_t *pcbRead); 305 305 306 306 /** … … 314 314 * If NULL the entire buffer must be successfully written. 315 315 */ 316 static DECLCALLBACK(int) backWrite(P DBGCBACK pBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten);317 318 /** 319 * @copydoc FNDBGCBACKSETREADY320 */ 321 static DECLCALLBACK(void) backSetReady(P DBGCBACK pBack, bool fReady);316 static DECLCALLBACK(int) backWrite(PCDBGCIO pIo, const void *pvBuf, size_t cbBuf, size_t *pcbWritten); 317 318 /** 319 * @copydoc DBGCIO::PfnSetReady 320 */ 321 static DECLCALLBACK(void) backSetReady(PCDBGCIO pIo, bool fReady); 322 322 323 323 /** … … 388 388 389 389 /** The debug console backend structure. 390 * Use VBOXDBGCONSOLE_FROM_DBGC BACK to convert the DBGCBACKpointer to a object pointer. */390 * Use VBOXDBGCONSOLE_FROM_DBGCIO to convert the DBGCIO pointer to a object pointer. */ 391 391 struct VBoxDbgConsoleBack 392 392 { 393 DBGC BACKCore;393 DBGCIO Core; 394 394 VBoxDbgConsole *pSelf; 395 395 } m_Back; … … 399 399 * @todo find a better way because offsetof is undefined on objects and g++ gets very noisy because of that. 400 400 */ 401 # define VBOXDBGCONSOLE_FROM_DBGC BACK(pBack) ( ((struct VBoxDbgConsoleBack *)(pBack))->pSelf )401 # define VBOXDBGCONSOLE_FROM_DBGCIO(pIo) ( ((struct VBoxDbgConsoleBack *)(pBack))->pSelf ) 402 402 403 403 /** Change focus to the input field. */ -
trunk/src/VBox/Debugger/testcase/tstDBGCParser.cpp
r82968 r86327 31 31 * Internal Functions * 32 32 *********************************************************************************************************************************/ 33 static DECLCALLBACK(bool) tstDBGCBackInput(P DBGCBACKpBack, uint32_t cMillies);34 static DECLCALLBACK(int) tstDBGCBackRead(P DBGCBACKpBack, void *pvBuf, size_t cbBuf, size_t *pcbRead);35 static DECLCALLBACK(int) tstDBGCBackWrite(P DBGCBACKpBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten);36 static DECLCALLBACK(void) tstDBGCBackSetReady(P DBGCBACKpBack, bool fReady);33 static DECLCALLBACK(bool) tstDBGCBackInput(PCDBGCIO pBack, uint32_t cMillies); 34 static DECLCALLBACK(int) tstDBGCBackRead(PCDBGCIO pBack, void *pvBuf, size_t cbBuf, size_t *pcbRead); 35 static DECLCALLBACK(int) tstDBGCBackWrite(PCDBGCIO pBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten); 36 static DECLCALLBACK(void) tstDBGCBackSetReady(PCDBGCIO pBack, bool fReady); 37 37 38 38 … … 43 43 static RTTEST g_hTest = NIL_RTTEST; 44 44 45 /** The DBGC backend structure for use in this testcase. */ 46 static DBGCBACK g_tstBack = 47 { 45 /** The DBGC I/O structure for use in this testcase. */ 46 static DBGCIO g_tstBack = 47 { 48 NULL, /**pfnDestroy*/ 48 49 tstDBGCBackInput, 49 50 tstDBGCBackRead, … … 71 72 * @param cMillies Number of milliseconds to wait on input data. 72 73 */ 73 static DECLCALLBACK(bool) tstDBGCBackInput(P DBGCBACKpBack, uint32_t cMillies)74 static DECLCALLBACK(bool) tstDBGCBackInput(PCDBGCIO pBack, uint32_t cMillies) 74 75 { 75 76 return g_pszInput != NULL … … 91 92 * successful return. 92 93 */ 93 static DECLCALLBACK(int) tstDBGCBackRead(P DBGCBACKpBack, void *pvBuf, size_t cbBuf, size_t *pcbRead)94 static DECLCALLBACK(int) tstDBGCBackRead(PCDBGCIO pBack, void *pvBuf, size_t cbBuf, size_t *pcbRead) 94 95 { 95 96 if (g_pszInput && *g_pszInput) … … 120 121 * If NULL the entire buffer must be successfully written. 121 122 */ 122 static DECLCALLBACK(int) tstDBGCBackWrite(P DBGCBACKpBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten)123 static DECLCALLBACK(int) tstDBGCBackWrite(PCDBGCIO pBack, const void *pvBuf, size_t cbBuf, size_t *pcbWritten) 123 124 { 124 125 const char *pch = (const char *)pvBuf; … … 159 160 * @param fReady Whether it's ready (true) or busy (false). 160 161 */ 161 static DECLCALLBACK(void) tstDBGCBackSetReady(P DBGCBACKpBack, bool fReady)162 static DECLCALLBACK(void) tstDBGCBackSetReady(PCDBGCIO pBack, bool fReady) 162 163 { 163 164 }
Note:
See TracChangeset
for help on using the changeset viewer.