Changeset 10016 in vbox
- Timestamp:
- Jun 30, 2008 1:58:19 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dis.h
r9924 r10016 642 642 DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, POP_PARAMETER pParam, void **ppReg, size_t *pcbSize); 643 643 644 DISDECL(int) DISFetchReg8(PC PUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal);645 DISDECL(int) DISFetchReg16(PC PUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal);646 DISDECL(int) DISFetchReg32(PC PUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal);647 DISDECL(int) DISFetchReg64(PC PUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal);648 DISDECL(int) DISFetchRegSeg(PC PUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal);649 DISDECL(int) DISFetchRegSegEx(PC PUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, PCPUMSELREGHID *ppSelHidReg);644 DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal); 645 DISDECL(int) DISFetchReg16(PCCPUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal); 646 DISDECL(int) DISFetchReg32(PCCPUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal); 647 DISDECL(int) DISFetchReg64(PCCPUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal); 648 DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal); 649 DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, PCPUMSELREGHID *ppSelHidReg); 650 650 DISDECL(int) DISWriteReg8(PCPUMCTXCORE pRegFrame, unsigned reg8, uint8_t val8); 651 651 DISDECL(int) DISWriteReg16(PCPUMCTXCORE pRegFrame, unsigned reg32, uint16_t val16); -
trunk/include/VBox/selm.h
r9678 r10016 207 207 * @param ppvGC Where to store the GC flat address. 208 208 */ 209 SELMDECL(int) SELMToFlatEx(PVM pVM, DIS_SELREG SelReg, PC PUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC);209 SELMDECL(int) SELMToFlatEx(PVM pVM, DIS_SELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC); 210 210 211 211 /** -
trunk/src/VBox/Disassembler/DisasmReg.cpp
r9926 r10016 309 309 * 310 310 */ 311 DISDECL(int) DISFetchReg8(PC PUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal)311 DISDECL(int) DISFetchReg8(PCCPUMCTXCORE pCtx, unsigned reg8, uint8_t *pVal) 312 312 { 313 313 AssertReturn(reg8 < ELEMENTS(g_aReg8Index), VERR_INVALID_PARAMETER); … … 321 321 * 322 322 */ 323 DISDECL(int) DISFetchReg16(PC PUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal)323 DISDECL(int) DISFetchReg16(PCCPUMCTXCORE pCtx, unsigned reg16, uint16_t *pVal) 324 324 { 325 325 AssertReturn(reg16 < ELEMENTS(g_aReg16Index), VERR_INVALID_PARAMETER); … … 333 333 * 334 334 */ 335 DISDECL(int) DISFetchReg32(PC PUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal)335 DISDECL(int) DISFetchReg32(PCCPUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal) 336 336 { 337 337 AssertReturn(reg32 < ELEMENTS(g_aReg32Index), VERR_INVALID_PARAMETER); … … 345 345 * 346 346 */ 347 DISDECL(int) DISFetchReg64(PC PUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal)347 DISDECL(int) DISFetchReg64(PCCPUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal) 348 348 { 349 349 AssertReturn(reg64 < ELEMENTS(g_aReg64Index), VERR_INVALID_PARAMETER); … … 405 405 * 406 406 */ 407 DISDECL(int) DISFetchRegSeg(PC PUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal)407 DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal) 408 408 { 409 409 AssertReturn(sel < ELEMENTS(g_aRegSegIndex), VERR_INVALID_PARAMETER); … … 418 418 * 419 419 */ 420 DISDECL(int) DISFetchRegSegEx(PC PUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, CPUMSELREGHID **ppSelHidReg)420 DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, CPUMSELREGHID **ppSelHidReg) 421 421 { 422 422 AssertReturn(sel < ELEMENTS(g_aRegSegIndex), VERR_INVALID_PARAMETER); -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r10013 r10016 142 142 { 143 143 RTGCPTR GCPtrInstr; 144 int rc = SELM ValidateAndConvertCSAddr(pVM, pCtxCore->eflags, pCtxCore->ss, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid, (RTGCPTR)pCtxCore->rip, &GCPtrInstr);144 int rc = SELMToFlatEx(pVM, DIS_SELREG_CS, pCtxCore, pCtxCore->rip, 0, &GCPtrInstr); 145 145 if (VBOX_FAILURE(rc)) 146 146 { … … 203 203 204 204 LogFlow(("EMInterpretInstruction %VGv fault %VGv\n", pRegFrame->rip, pvFault)); 205 int rc = SELM ValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, (RTGCPTR)pRegFrame->rip, &pbCode);205 int rc = SELMToFlatEx(pVM, DIS_SELREG_CS, pRegFrame, pRegFrame->rip, 0, &pbCode); 206 206 if (VBOX_SUCCESS(rc)) 207 207 { -
trunk/src/VBox/VMM/VMMAll/SELMAll.cpp
r9817 r10016 145 145 * @param ppvGC Where to store the GC flat address. 146 146 */ 147 SELMDECL(int) SELMToFlatEx(PVM pVM, DIS_SELREG SelReg, PC PUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC)147 SELMDECL(int) SELMToFlatEx(PVM pVM, DIS_SELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC) 148 148 { 149 149 PCPUMSELREGHID pHiddenSel; … … 746 746 * @param Addr Address part. 747 747 * @param ppvFlat Where to store the flat address. 748 * @param pcBits Where to store the segment bitness (16/32/64). Optional.749 748 */ 750 749 DECLINLINE(int) selmValidateAndConvertCSAddrHidden(PVM pVM, RTSEL SelCPL, RTSEL SelCS, PCPUMSELREGHID pHidCS, RTGCPTR Addr, PRTGCPTR ppvFlat) … … 790 789 return VERR_OUT_OF_SELECTOR_BOUNDS; 791 790 } 791 Log(("Invalid RPL Attr.n.u4Type=%x cpl=%x dpl=%x\n", pHidCS->Attr.n.u4Type, uLevel, pHidCS->Attr.n.u2Dpl)); 792 792 return VERR_INVALID_RPL; 793 793 }
Note:
See TracChangeset
for help on using the changeset viewer.