DBGFCpu.cpp revision a657045dcccbf6db1cab8d33145bac07fc57eae9
/* $Id$ */
/** @file
* DBGF - Debugger Facility, CPU State Accessors.
*/
/*
* Copyright (C) 2009-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_DBGF
#include "DBGFInternal.h"
/**
* Wrapper around CPUMGetGuestMode.
*
* @returns VINF_SUCCESS.
* @param pVM Pointer to the VM.
* @param idCpu The current CPU ID.
* @param penmMode Where to return the mode.
*/
{
return VINF_SUCCESS;
}
/**
* Get the current CPU mode.
*
* @returns The CPU mode on success, CPUMMODE_INVALID on failure.
* @param pUVM The user mode VM handle.
* @param idCpu The target CPU ID.
*/
{
int rc = VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3CpuGetMode, 3, pUVM->pVM, idCpu, &enmMode);
if (RT_FAILURE(rc))
return CPUMMODE_INVALID;
return enmMode;
}
/**
* Wrapper around CPUMIsGuestIn64BitCode.
*
* @returns VINF_SUCCESS.
* @param pVM Pointer to the VM.
* @param idCpu The current CPU ID.
* @param pfIn64BitCode Where to return the result.
*/
{
return VINF_SUCCESS;
}
/**
* Checks if the given CPU is executing 64-bit code or not.
*
* @returns true / false accordingly.
* @param pUVM The user mode VM handle.
* @param idCpu The target CPU ID.
*/
{
UVM_ASSERT_VALID_EXT_RETURN(pUVM, false);
int rc = VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3CpuIn64BitCode, 3, pUVM->pVM, idCpu, &fIn64BitCode);
if (RT_FAILURE(rc))
return false;
return fIn64BitCode;
}
/**
* Get the number of CPUs (or threads if you insist).
*
* @returns The number of CPUs
* @param pUVM The user mode VM handle.
*/
{
}