Changeset 41671 in vbox for trunk/src/VBox/VMM/VMMR3/CSAM.cpp
- Timestamp:
- Jun 12, 2012 3:22:43 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CSAM.cpp
r41662 r41671 762 762 763 763 DECLINLINE(int) CSAMR3DISInstr(PVM pVM, RTRCPTR InstrGC, uint8_t *InstrHC, DISCPUMODE enmCpuMode, 764 PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput )764 PDISCPUSTATE pCpu, uint32_t *pcbInstr, char *pszOutput, size_t cbOutput) 765 765 { 766 766 (pCpu)->apvUserData[1] = InstrHC; 767 767 (pCpu)->apvUserData[2] = (void *)(uintptr_t)InstrGC; Assert(sizeof(InstrGC) <= sizeof(pCpu->apvUserData[0])); 768 768 #ifdef DEBUG 769 return DISInstr Ex(InstrGC, 0, enmCpuMode, CSAMR3ReadBytes, pVM, OPTYPE_ALL,770 pCpu, pcbInstr, pszOutput);769 return DISInstrToStrEx(InstrGC, enmCpuMode, CSAMR3ReadBytes, pVM, OPTYPE_ALL, 770 pCpu, pcbInstr, pszOutput, cbOutput); 771 771 #else 772 772 /* We are interested in everything except harmless stuff */ 773 return DISInstrEx(InstrGC, 0, enmCpuMode, CSAMR3ReadBytes, pVM, ~(OPTYPE_INVALID | OPTYPE_HARMLESS | OPTYPE_RRM_MASK), 774 pCpu, pcbInstr, pszOutput); 773 if (pszOutput) 774 return DISInstrToStrEx(InstrGC, enmCpuMode, CSAMR3ReadBytes, pVM, ~(OPTYPE_INVALID | OPTYPE_HARMLESS | OPTYPE_RRM_MASK), 775 pCpu, pcbInstr, pszOutput, cbOutput); 776 return DISCoreOneExEx(InstrGC, enmCpuMode, CSAMR3ReadBytes, pVM, ~(OPTYPE_INVALID | OPTYPE_HARMLESS | OPTYPE_RRM_MASK), 777 pCpu, pcbInstr); 775 778 #endif 776 779 } … … 869 872 870 873 rc = CSAMR3DISInstr(pVM, pCurInstrGC, pCurInstrHC, (fCode32) ? CPUMODE_32BIT : CPUMODE_16BIT, 871 &cpu, &opsize, NULL );874 &cpu, &opsize, NULL, 0); 872 875 } 873 876 AssertRC(rc); … … 1052 1055 #ifdef DEBUG 1053 1056 rc2 = CSAMR3DISInstr(pVM, pCurInstrGC, pCurInstrHC, (fCode32) ? CPUMODE_32BIT : CPUMODE_16BIT, 1054 &cpu, &opsize, szOutput );1057 &cpu, &opsize, szOutput, sizeof(szOutput)); 1055 1058 if (RT_SUCCESS(rc2)) Log(("CSAM Call Analysis: %s", szOutput)); 1056 1059 #else 1057 1060 rc2 = CSAMR3DISInstr(pVM, pCurInstrGC, pCurInstrHC, (fCode32) ? CPUMODE_32BIT : CPUMODE_16BIT, 1058 &cpu, &opsize, NULL );1061 &cpu, &opsize, NULL, 0); 1059 1062 #endif 1060 1063 STAM_PROFILE_STOP(&pVM->csam.s.StatTimeDisasm, a); … … 1265 1268 #ifdef DEBUG 1266 1269 rc2 = CSAMR3DISInstr(pVM, pCurInstrGC, pCurInstrHC, fCode32 ? CPUMODE_32BIT : CPUMODE_16BIT, 1267 &cpu, &opsize, szOutput );1270 &cpu, &opsize, szOutput, sizeof(szOutput)); 1268 1271 if (RT_SUCCESS(rc2)) Log(("CSAM Analysis: %s", szOutput)); 1269 1272 #else 1270 1273 rc2 = CSAMR3DISInstr(pVM, pCurInstrGC, pCurInstrHC, fCode32 ? CPUMODE_32BIT : CPUMODE_16BIT, 1271 &cpu, &opsize, NULL );1274 &cpu, &opsize, NULL, 0); 1272 1275 #endif 1273 1276 STAM_PROFILE_STOP(&pVM->csam.s.StatTimeDisasm, a);
Note:
See TracChangeset
for help on using the changeset viewer.