Changeset 86755 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Oct 29, 2020 8:30:25 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141149
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp
r86178 r86755 945 945 946 946 947 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 947 948 /** 948 949 * Breakpoint enumeration callback function. … … 954 955 */ 955 956 static DECLCALLBACK(int) dbgcEnumBreakpointsCallback(PUVM pUVM, void *pvUser, PCDBGFBP pBp) 957 #else 958 /** 959 * Breakpoint enumeration callback function. 960 * 961 * @returns VBox status code. Any failure will stop the enumeration. 962 * @param pUVM The user mode VM handle. 963 * @param pvUser The user argument. 964 * @param hBp The DBGF breakpoint handle. 965 * @param pBp Pointer to the breakpoint information. (readonly) 966 */ 967 static DECLCALLBACK(int) dbgcEnumBreakpointsCallback(PUVM pUVM, void *pvUser, DBGFBP hBp, PCDBGFBPPUB pBp) 968 #endif 956 969 { 957 970 PDBGC pDbgc = (PDBGC)pvUser; 971 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 958 972 PDBGCBP pDbgcBp = dbgcBpGet(pDbgc, pBp->iBp); 973 #else 974 PDBGCBP pDbgcBp = dbgcBpGet(pDbgc, hBp); 975 #endif 959 976 960 977 /* 961 978 * BP type and size. 962 979 */ 980 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 963 981 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, "%#4x %c ", pBp->iBp, pBp->fEnabled ? 'e' : 'd'); 982 #else 983 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, "%#4x %c ", hBp, DBGF_BP_PUB_IS_ENABLED(pBp->fFlagsAndType) ? 'e' : 'd'); 984 #endif 964 985 bool fHasAddress = false; 986 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 965 987 switch (pBp->enmType) 988 #else 989 switch (DBGF_BP_PUB_GET_TYPE(pBp->fFlagsAndType)) 990 #endif 966 991 { 967 992 case DBGFBPTYPE_INT3: … … 986 1011 } 987 1012 1013 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 988 1014 case DBGFBPTYPE_REM: 989 1015 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " r %RGv", pBp->u.Rem.GCPtr); 990 1016 fHasAddress = true; 991 1017 break; 1018 #endif 992 1019 993 1020 /** @todo realign the list when I/O and MMIO breakpoint command have been added and it's possible to test this code. */ … … 995 1022 case DBGFBPTYPE_MMIO: 996 1023 { 1024 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 997 1025 uint32_t fAccess = pBp->enmType == DBGFBPTYPE_PORT_IO ? pBp->u.PortIo.fAccess : pBp->u.Mmio.fAccess; 998 1026 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, pBp->enmType == DBGFBPTYPE_PORT_IO ? " i" : " m"); 1027 #else 1028 uint32_t fAccess = DBGF_BP_PUB_GET_TYPE(pBp->fFlagsAndType) == DBGFBPTYPE_PORT_IO ? pBp->u.PortIo.fAccess : pBp->u.Mmio.fAccess; 1029 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, DBGF_BP_PUB_GET_TYPE(pBp->fFlagsAndType) == DBGFBPTYPE_PORT_IO ? " i" : " m"); 1030 #endif 999 1031 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " %c%c%c%c%c%c", 1000 1032 fAccess & DBGFBPIOACCESS_READ_MASK ? 'r' : '-', … … 1011 1043 fAccess & DBGFBPIOACCESS_WRITE_QWORD ? '8' : '-', 1012 1044 fAccess & DBGFBPIOACCESS_WRITE_OTHER ? '+' : '-'); 1045 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 1013 1046 if (pBp->enmType == DBGFBPTYPE_PORT_IO) 1047 #else 1048 if (DBGF_BP_PUB_GET_TYPE(pBp->fFlagsAndType) == DBGFBPTYPE_PORT_IO) 1049 #endif 1014 1050 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " %04x-%04x", 1015 1051 pBp->u.PortIo.uPort, pBp->u.PortIo.uPort + pBp->u.PortIo.cPorts - 1); … … 1020 1056 1021 1057 default: 1058 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 1022 1059 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " unknown type %d!!", pBp->enmType); 1060 #else 1061 DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " unknown type %d!!", DBGF_BP_PUB_GET_TYPE(pBp->fFlagsAndType)); 1062 #endif 1023 1063 AssertFailed(); 1024 1064 break; -
trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
r86327 r86755 2382 2382 case DBGFEVENT_BREAKPOINT_HYPER: 2383 2383 { 2384 rc = dbgcBpExec(pDbgc, pEvent->u.Bp. iBp);2384 rc = dbgcBpExec(pDbgc, pEvent->u.Bp.hBp); 2385 2385 switch (rc) 2386 2386 { 2387 2387 case VERR_DBGC_BP_NOT_FOUND: 2388 2388 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Unknown breakpoint %u! (%s)\n", 2389 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));2389 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 2390 2390 break; 2391 2391 2392 2392 case VINF_DBGC_BP_NO_COMMAND: 2393 2393 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Breakpoint %u! (%s)\n", 2394 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));2394 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 2395 2395 break; 2396 2396 2397 2397 case VINF_BUFFER_OVERFLOW: 2398 2398 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Breakpoint %u! Command too long to execute! (%s)\n", 2399 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));2399 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 2400 2400 break; 2401 2401 -
trunk/src/VBox/Debugger/DBGCRemoteKd.cpp
r86327 r86755 1160 1160 typedef struct KDCTXHWBP 1161 1161 { 1162 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 1162 1163 /** The DBGF breakpoint handle if active, UINT32_MAX if not active. */ 1163 uint32_t iDbgfBp; 1164 uint32_t hDbgfBp; 1165 #else 1166 /** The DBGF breakpoint handle if active, NIL_DBGFBP if not active. */ 1167 DBGFBP hDbgfBp; 1168 #endif 1164 1169 /** The linear address of the breakpoint if active. */ 1165 1170 RTGCPTR GCPtrBp; … … 1239 1244 /** Returns the value of a possibly sign extended guest context pointer received for 32bit targets. */ 1240 1245 #define KD_PTR_GET(a_pThis, a_GCPtr) ((a_pThis)->f32Bit ? (a_GCPtr) & ~UINT64_C(0xffffffff00000000) : (a_GCPtr)) 1246 1247 #ifndef VBOX_WITH_LOTS_OF_DBGF_BPS 1248 # define NIL_DBGFBP ((uint32_t)UINT32_MAX) 1249 #endif 1241 1250 1242 1251 … … 1519 1528 PKDCTXHWBP pBp = &pThis->aHwBp[i]; 1520 1529 1521 if (pBp-> iDbgfBp != UINT32_MAX)1522 { 1523 int rc = DBGFR3BpClear(pThis->Dbgc.pUVM, pBp-> iDbgfBp);1530 if (pBp->hDbgfBp != NIL_DBGFBP) 1531 { 1532 int rc = DBGFR3BpClear(pThis->Dbgc.pUVM, pBp->hDbgfBp); 1524 1533 AssertRC(rc); 1525 1534 } 1526 1535 1527 pBp-> iDbgfBp = UINT32_MAX;1536 pBp->hDbgfBp = NIL_DBGFBP; 1528 1537 pBp->GCPtrBp = 0; 1529 1538 pBp->fAcc = 0; … … 1561 1570 { 1562 1571 /* Clear the old breakpoint. */ 1563 if (pBp-> iDbgfBp != UINT32_MAX)1564 { 1565 rc = DBGFR3BpClear(pThis->Dbgc.pUVM, pBp-> iDbgfBp);1572 if (pBp->hDbgfBp != NIL_DBGFBP) 1573 { 1574 rc = DBGFR3BpClear(pThis->Dbgc.pUVM, pBp->hDbgfBp); 1566 1575 AssertRC(rc); 1567 pBp-> iDbgfBp = UINT32_MAX;1576 pBp->hDbgfBp = NIL_DBGFBP; 1568 1577 } 1569 1578 … … 1599 1608 1600 1609 rc = DBGFR3BpSetReg(pThis->Dbgc.pUVM, &AddrBp, 0 /*iHitTrigger*/, UINT64_MAX /*iHitDisable*/, 1601 pBp->fAcc, cb, &pBp-> iDbgfBp);1610 pBp->fAcc, cb, &pBp->hDbgfBp); 1602 1611 } 1603 1612 } … … 3917 3926 case DBGFEVENT_BREAKPOINT_HYPER: 3918 3927 { 3919 rc = dbgcBpExec(pDbgc, pEvent->u.Bp. iBp);3928 rc = dbgcBpExec(pDbgc, pEvent->u.Bp.hBp); 3920 3929 switch (rc) 3921 3930 { 3922 3931 case VERR_DBGC_BP_NOT_FOUND: 3923 3932 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Unknown breakpoint %u! (%s)\n", 3924 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));3933 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 3925 3934 break; 3926 3935 3927 3936 case VINF_DBGC_BP_NO_COMMAND: 3928 3937 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Breakpoint %u! (%s)\n", 3929 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));3938 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 3930 3939 break; 3931 3940 3932 3941 case VINF_BUFFER_OVERFLOW: 3933 3942 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: Breakpoint %u! Command too long to execute! (%s)\n", 3934 pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));3943 pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 3935 3944 break; 3936 3945 … … 3951 3960 for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aHwBp); i++) 3952 3961 { 3953 if (pThis->aHwBp[i]. iDbgfBp == pEvent->u.Bp.iBp)3962 if (pThis->aHwBp[i].hDbgfBp == pEvent->u.Bp.hBp) 3954 3963 { 3955 3964 pThis->aHwBp[i].fTriggered = true; … … 4293 4302 { 4294 4303 PKDCTXHWBP pBp = &pThis->aHwBp[i]; 4295 pBp-> iDbgfBp = UINT32_MAX;4304 pBp->hDbgfBp = NIL_DBGFBP; 4296 4305 } 4297 4306 -
trunk/src/VBox/Debugger/DBGConsole.cpp
r86327 r86755 685 685 { 686 686 pDbgc->idCpu = pEvent->idCpu; 687 rc = dbgcBpExec(pDbgc, pEvent->u.Bp. iBp);687 rc = dbgcBpExec(pDbgc, pEvent->u.Bp.hBp); 688 688 switch (rc) 689 689 { 690 690 case VERR_DBGC_BP_NOT_FOUND: 691 691 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event/%u: Unknown breakpoint %u! (%s)\n", 692 pEvent->idCpu, pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));692 pEvent->idCpu, pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 693 693 break; 694 694 695 695 case VINF_DBGC_BP_NO_COMMAND: 696 696 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event/%u: Breakpoint %u! (%s)\n", 697 pEvent->idCpu, pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));697 pEvent->idCpu, pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 698 698 break; 699 699 700 700 case VINF_BUFFER_OVERFLOW: 701 701 rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event/%u: Breakpoint %u! Command too long to execute! (%s)\n", 702 pEvent->idCpu, pEvent->u.Bp. iBp, dbgcGetEventCtx(pEvent->enmCtx));702 pEvent->idCpu, pEvent->u.Bp.hBp, dbgcGetEventCtx(pEvent->enmCtx)); 703 703 break; 704 704 -
trunk/src/VBox/Debugger/Makefile.kmk
r86327 r86755 35 35 Debugger_TEMPLATE = VBOXR3 36 36 Debugger_DEFS = IN_VMM_R3 IN_DBG_R3 IN_DIS 37 ifdef VBOX_WITH_LOTS_OF_DBGF_BPS 38 Debugger_DEFS += VBOX_WITH_LOTS_OF_DBGF_BPS 39 endif 37 40 ifneq ($(KBUILD_TYPE),release) 38 41 Debugger_DEFS += VBOX_WITH_DEBUGGER_TCP_BY_DEFAULT
Note:
See TracChangeset
for help on using the changeset viewer.