- Timestamp:
- Mar 28, 2024 2:07:36 AM (10 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r104099 r104100 3236 3236 #ifdef IEMNATIVE_WITH_TB_DEBUG_INFO 3237 3237 pReNative->pDbgInfo->cEntries = 0; 3238 pReNative->pDbgInfo->offNativeLast = UINT32_MAX; 3238 3239 #endif 3239 3240 pReNative->pTbOrg = pTb; … … 3712 3713 3713 3714 /* 3714 * Search backwards to see if we've got a similar record already. 3715 */ 3716 uint32_t idx = pDbgInfo->cEntries; 3717 uint32_t idxStop = idx > 16 ? idx - 16 : 0; 3718 while (idx-- > idxStop) 3719 if (pDbgInfo->aEntries[idx].Gen.uType == kIemTbDbgEntryType_NativeOffset) 3720 { 3721 if (pDbgInfo->aEntries[idx].NativeOffset.offNative == off) 3722 return; 3723 AssertStmt(pDbgInfo->aEntries[idx].NativeOffset.offNative < off, 3724 IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_DBGINFO_IPE_2)); 3725 break; 3726 } 3715 * Do we need this one? 3716 */ 3717 uint32_t const offPrev = pDbgInfo->offNativeLast; 3718 if (offPrev == off) 3719 return; 3720 AssertStmt(offPrev < off || offPrev == UINT32_MAX, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_DBGINFO_IPE_2)); 3727 3721 3728 3722 /* … … 3732 3726 pEntry->NativeOffset.uType = kIemTbDbgEntryType_NativeOffset; 3733 3727 pEntry->NativeOffset.offNative = off; 3728 pDbgInfo->offNativeLast = off; 3734 3729 } 3735 3730 … … 4790 4785 iemNativeDbgInfoAddGuestRegDirty(pReNative, false /*fSimdReg*/, enmGstReg, idxReg); 4791 4786 # endif 4792 4793 4787 pReNative->Core.bmGstRegShadowDirty |= RT_BIT_64(enmGstReg); 4794 4788 } … … 4823 4817 iemNativeDbgInfoAddGuestRegDirty(pReNative, false /*fSimdReg*/, enmGstReg, idxRegNew); 4824 4818 # endif 4825 4826 4819 pReNative->Core.bmGstRegShadowDirty |= RT_BIT_64(enmGstReg); 4827 4820 } … … 8603 8596 iemNativeDbgInfoAddGuestRegDirty(pReNative, false /*fSimdReg*/, enmGstReg, idxReg); 8604 8597 # endif 8605 8606 8598 pReNative->Core.bmGstRegShadowDirty |= RT_BIT_64(enmGstReg); 8607 8599 } … … 10090 10082 #ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING 10091 10083 case kIemTbDbgEntryType_DelayedPcUpdate: 10092 pHlp->pfnPrintf(pHlp, 10093 " Updating guest PC value by %u (cInstrSkipped=%u)\n", 10084 pHlp->pfnPrintf(pHlp, " Updating guest PC value by %u (cInstrSkipped=%u)\n", 10094 10085 pDbgInfo->aEntries[iDbgEntry].DelayedPcUpdate.offPc, 10095 10086 pDbgInfo->aEntries[iDbgEntry].DelayedPcUpdate.cInstrSkipped); … … 10101 10092 { 10102 10093 PCIEMTBDBGENTRY const pEntry = &pDbgInfo->aEntries[iDbgEntry]; 10103 const char * const pszGstReg = pEntry->GuestRegDirty.fSimdReg 10104 ? g_aGstSimdShadowInfo[pEntry->GuestRegDirty.idxGstReg].pszName 10105 : g_aGstShadowInfo[pEntry->GuestRegDirty.idxGstReg].pszName; 10106 const char * const pszHstReg = pEntry->GuestRegDirty.fSimdReg 10107 ? g_apszIemNativeHstSimdRegNames[pEntry->GuestRegDirty.idxHstReg] 10108 : g_apszIemNativeHstRegNames[pEntry->GuestRegDirty.idxHstReg]; 10109 pHlp->pfnPrintf(pHlp, 10110 " Guest register %s (shadowed by %s) is now dirty\n", 10094 const char * const pszGstReg = pEntry->GuestRegDirty.fSimdReg 10095 ? g_aGstSimdShadowInfo[pEntry->GuestRegDirty.idxGstReg].pszName 10096 : g_aGstShadowInfo[pEntry->GuestRegDirty.idxGstReg].pszName; 10097 const char * const pszHstReg = pEntry->GuestRegDirty.fSimdReg 10098 ? g_apszIemNativeHstSimdRegNames[pEntry->GuestRegDirty.idxHstReg] 10099 : g_apszIemNativeHstRegNames[pEntry->GuestRegDirty.idxHstReg]; 10100 pHlp->pfnPrintf(pHlp, " Guest register %s (shadowed by %s) is now marked dirty (intent)\n", 10111 10101 pszGstReg, pszHstReg); 10112 10102 continue; … … 10114 10104 10115 10105 case kIemTbDbgEntryType_GuestRegWriteback: 10116 pHlp->pfnPrintf(pHlp, 10117 " Writing dirty %s registers (gst %#RX64)\n", 10106 pHlp->pfnPrintf(pHlp, " Writing dirty %s registers (gst %#RX32)\n", 10118 10107 pDbgInfo->aEntries[iDbgEntry].GuestRegWriteback.fSimdReg ? "SIMD" : "general", 10119 10108 pDbgInfo->aEntries[iDbgEntry].GuestRegWriteback.fGstReg); -
trunk/src/VBox/VMM/include/IEMInternal.h
r104095 r104100 1137 1137 /** Number of entries in aEntries. */ 1138 1138 uint32_t cEntries; 1139 /** The offset of the last kIemTbDbgEntryType_NativeOffset record. */ 1140 uint32_t offNativeLast; 1139 1141 /** Debug info entries. */ 1140 1142 RT_FLEXIBLE_ARRAY_EXTENSION
Note:
See TracChangeset
for help on using the changeset viewer.