vbox的更動 44399 路徑 trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
- 時間撮記:
- 2013-1-27 下午09:12:53 (12 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
r42420 r44399 30 30 #include <VBox/param.h> 31 31 #include <VBox/vmm/vm.h> 32 #include <VBox/vmm/uvm.h> 32 33 #include "internal/pgm.h" 33 34 … … 296 297 : pSelInfo->Sel == DIS_FMT_SEL_GET_VALUE(u32Sel)) 297 298 { 298 rc = DBGFR3AddrFromSelInfoOff(pState->pVM , &Addr, pSelInfo, uAddress);299 rc = DBGFR3AddrFromSelInfoOff(pState->pVM->pUVM, &Addr, pSelInfo, uAddress); 299 300 if (RT_SUCCESS(rc)) 300 rc = DBGFR3AsSymbolByAddr(pState->pVM , pState->hAs, &Addr, &off, &Sym, NULL /*phMod*/);301 rc = DBGFR3AsSymbolByAddr(pState->pVM->pUVM, pState->hAs, &Addr, &off, &Sym, NULL /*phMod*/); 301 302 } 302 303 else … … 576 577 * 577 578 * @returns VBox status code. 578 * @param p VM Pointer to the VM.579 * @param pUVM The user mode VM handle. 579 580 * @param idCpu The ID of virtual CPU. 580 581 * @param Sel The code selector. This used to determine the 32/16 bit ness and … … 591 592 * address conversion. 592 593 */ 593 VMMR3DECL(int) DBGFR3DisasInstrEx(P VM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,594 VMMR3DECL(int) DBGFR3DisasInstrEx(PUVM pUVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags, 594 595 char *pszOutput, uint32_t cbOutput, uint32_t *pcbInstr) 595 596 { 596 597 AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER); 597 598 *pszOutput = '\0'; 599 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 600 PVM pVM = pUVM->pVM; 598 601 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 599 AssertReturn(idCpu < p VM->cCpus, VERR_INVALID_CPU_ID);602 AssertReturn(idCpu < pUVM->cCpus, VERR_INVALID_CPU_ID); 600 603 AssertReturn(!(fFlags & ~DBGF_DISAS_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER); 601 604 AssertReturn((fFlags & DBGF_DISAS_FLAGS_MODE_MASK) <= DBGF_DISAS_FLAGS_64BIT_MODE, VERR_INVALID_PARAMETER); … … 626 629 * terminated if @a cbOutput is greater than zero. 627 630 * @param cbOutput Size of the output buffer. 628 */ 629 VMMR3DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput) 631 * @thread EMT(pVCpu) 632 */ 633 VMMR3_INT_DECL(int) DBGFR3DisasInstrCurrent(PVMCPU pVCpu, char *pszOutput, uint32_t cbOutput) 630 634 { 631 635 AssertReturn(cbOutput > 0, VERR_INVALID_PARAMETER); 632 636 *pszOutput = '\0'; 633 AssertReturn(pVCpu, VERR_INVALID_CONTEXT); 634 return DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, 635 DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE, 636 pszOutput, cbOutput, NULL); 637 Assert(VMCPU_IS_EMT(pVCpu)); 638 639 RTGCPTR GCPtr = 0; 640 return dbgfR3DisasInstrExOnVCpu(pVCpu->pVMR3, pVCpu, 0, &GCPtr, 641 DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE, 642 pszOutput, cbOutput, NULL); 637 643 } 638 644 … … 645 651 * @param pVCpu Pointer to the VMCPU. 646 652 * @param pszPrefix Short prefix string to the disassembly string. (optional) 653 * @thread EMT(pVCpu) 647 654 */ 648 655 VMMR3DECL(int) DBGFR3DisasInstrCurrentLogInternal(PVMCPU pVCpu, const char *pszPrefix) … … 667 674 * 668 675 * @returns VBox status code. 669 * @param pVM Pointer to the VM.670 676 * @param pVCpu Pointer to the VMCPU, defaults to CPU 0 if NULL. 671 677 * @param Sel The code selector. This used to determine the 32/16 bit-ness and … … 673 679 * @param GCPtr The code address relative to the base of Sel. 674 680 * @param pszPrefix Short prefix string to the disassembly string. (optional) 681 * @thread EMT(pVCpu) 675 682 */ 676 683 VMMR3DECL(int) DBGFR3DisasInstrLogInternal(PVMCPU pVCpu, RTSEL Sel, RTGCPTR GCPtr, const char *pszPrefix) 677 684 { 685 Assert(VMCPU_IS_EMT(pVCpu)); 686 678 687 char szBuf[256]; 679 int rc = DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, Sel, GCPtr, DBGF_DISAS_FLAGS_DEFAULT_MODE, 680 &szBuf[0], sizeof(szBuf), NULL); 688 RTGCPTR GCPtrTmp = GCPtr; 689 int rc = dbgfR3DisasInstrExOnVCpu(pVCpu->pVMR3, pVCpu, Sel, &GCPtrTmp, DBGF_DISAS_FLAGS_DEFAULT_MODE, 690 &szBuf[0], sizeof(szBuf), NULL); 681 691 if (RT_FAILURE(rc)) 682 692 RTStrPrintf(szBuf, sizeof(szBuf), "DBGFR3DisasInstrLog(, %RTsel, %RGv) failed with rc=%Rrc\n", Sel, GCPtr, rc);
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器