VirtualBox

忽略:
時間撮記:
2013-1-27 下午09:12:53 (12 年 以前)
作者:
vboxsync
訊息:

DBGF,DBGC,++: PVM -> PUVM. Some refactoring and cleanup as well.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMR3/PGMDbg.cpp

    r41965 r44399  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2424#include "PGMInternal.h"
    2525#include <VBox/vmm/vm.h>
     26#include <VBox/vmm/uvm.h>
    2627#include "PGMInline.h"
    2728#include <iprt/assert.h>
     
    103104 * @retval  VERR_INVALID_POINTER if the pointer is not within the GC physical memory.
    104105 *
    105  * @param   pVM         Pointer to the VM.
     106 * @param   pUVM        The user mode VM handle.
    106107 * @param   R3Ptr       The R3 pointer to convert.
    107108 * @param   pGCPhys     Where to store the GC physical address on success.
    108109 */
    109 VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PVM pVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
    110 {
    111     NOREF(pVM); NOREF(R3Ptr);
     110VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
     111{
     112    NOREF(pUVM); NOREF(R3Ptr);
    112113    *pGCPhys = NIL_RTGCPHYS;
    113114    return VERR_NOT_IMPLEMENTED;
     
    125126 * @retval  VERR_INVALID_POINTER if the pointer is not within the GC physical memory.
    126127 *
    127  * @param   pVM         Pointer to the VM.
     128 * @param   pUVM        The user mode VM handle.
    128129 * @param   R3Ptr       The R3 pointer to convert.
    129130 * @param   pHCPhys     Where to store the HC physical address on success.
    130131 */
    131 VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PVM pVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
    132 {
    133     NOREF(pVM); NOREF(R3Ptr);
     132VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
     133{
     134    NOREF(pUVM); NOREF(R3Ptr);
    134135    *pHCPhys = NIL_RTHCPHYS;
    135136    return VERR_NOT_IMPLEMENTED;
     
    146147 * @retval  VERR_INVALID_POINTER if the HC physical address is not within the GC physical memory.
    147148 *
    148  * @param   pVM     Pointer to the VM.
     149 * @param   pUVM        The user mode VM handle.
    149150 * @param   HCPhys  The HC physical address to convert.
    150151 * @param   pGCPhys Where to store the GC physical address on success.
    151152 */
    152 VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PVM pVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
    153 {
     153VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PUVM pUVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
     154{
     155    UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE);
     156    VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, VERR_INVALID_VM_HANDLE);
     157
    154158    /*
    155159     * Validate and adjust the input a bit.
     
    162166        return VERR_INVALID_POINTER;
    163167
    164     for (PPGMRAMRANGE pRam = pVM->pgm.s.CTX_SUFF(pRamRangesX);
     168    for (PPGMRAMRANGE pRam = pUVM->pVM->pgm.s.CTX_SUFF(pRamRangesX);
    165169         pRam;
    166170         pRam = pRam->CTX_SUFF(pNext))
     
    193197 * @todo    Unused?
    194198 */
    195 VMMR3DECL(int) PGMR3DbgReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb, uint32_t fFlags, size_t *pcbRead)
     199VMMR3_INT_DECL(int) PGMR3DbgReadGCPhys(PVM pVM, void *pvDst, RTGCPHYS GCPhysSrc, size_t cb, uint32_t fFlags, size_t *pcbRead)
    196200{
    197201    /* validate */
     
    244248 * @todo    Unused?
    245249 */
    246 VMMR3DECL(int) PGMR3DbgWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten)
     250VMMR3_INT_DECL(int) PGMR3DbgWriteGCPhys(PVM pVM, RTGCPHYS GCPhysDst, const void *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten)
    247251{
    248252    /* validate */
     
    295299 * @todo    Unused?
    296300 */
    297 VMMR3DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, uint32_t fFlags, size_t *pcbRead)
     301VMMR3_INT_DECL(int) PGMR3DbgReadGCPtr(PVM pVM, void *pvDst, RTGCPTR GCPtrSrc, size_t cb, uint32_t fFlags, size_t *pcbRead)
    298302{
    299303    /* validate */
     
    351355 * @todo    Unused?
    352356 */
    353 VMMR3DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten)
     357VMMR3_INT_DECL(int) PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten)
    354358{
    355359    /* validate */
     
    570574 * @param   pGCPhysHit      Where to store the address of the first occurrence on success.
    571575 */
    572 VMMR3DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, RTGCPHYS GCPhysAlign,
    573                                     const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit)
     576VMMR3_INT_DECL(int) PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, RTGCPHYS GCPhysAlign,
     577                                         const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit)
    574578{
    575579    /*
     
    730734 * @param   pGCPtrHit       Where to store the address of the first occurrence on success.
    731735 */
    732 VMMR3DECL(int) PGMR3DbgScanVirtual(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, RTGCPTR cbRange, RTGCPTR GCPtrAlign,
    733                                    const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPtrHit)
     736VMMR3_INT_DECL(int) PGMR3DbgScanVirtual(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, RTGCPTR cbRange, RTGCPTR GCPtrAlign,
     737                                        const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPtrHit)
    734738{
    735739    VMCPU_ASSERT_EMT(pVCpu);
     
    10381042    char        szPage[80];
    10391043    RTGCPHYS    GCPhys;
    1040     int rc = PGMR3DbgHCPhys2GCPhys(pState->pVM, HCPhys, &GCPhys);
     1044    int rc = PGMR3DbgHCPhys2GCPhys(pState->pVM->pUVM, HCPhys, &GCPhys);
    10411045    if (RT_SUCCESS(rc))
    10421046    {
     
    16811685        fFlags |= DBGFPGDMP_FLAGS_LME;
    16821686
    1683     return DBGFR3PagingDumpEx(pVM, pVCpu->idCpu, fFlags, cr3, 0, fLongMode ? UINT64_MAX : UINT32_MAX, cMaxDepth, pHlp);
     1687    return DBGFR3PagingDumpEx(pVM->pUVM, pVCpu->idCpu, fFlags, cr3, 0, fLongMode ? UINT64_MAX : UINT32_MAX, cMaxDepth, pHlp);
    16841688}
    16851689
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette