DBGFMem.cpp revision 4ae0468b4ae87a83e1a5f8c4f98ff78e840fde85
2N/A * DBGF - Debugger Facility, Memory Methods. 2N/A * Copyright (C) 2007 Sun Microsystems, Inc. 2N/A * This file is part of VirtualBox Open Source Edition (OSE), as 2N/A * you can redistribute it and/or modify it under the terms of the GNU 2N/A * General Public License (GPL) as published by the Free Software 2N/A * Foundation, in version 2 as it comes in the "COPYING" file of the 2N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 2N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 2N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa 2N/A * additional information or have any questions. 2N/A/******************************************************************************* 2N/A*******************************************************************************/ 2N/A * Scan guest memory for an exact byte string. 2N/A * @returns VBox status code. 2N/A * @param pVM The VM handle. 2N/A * @param pAddress Where to store the mixed address. 2N/A * @param cbRange The number of bytes to scan. 2N/A * @param pabNeedle What to search for - exact search. 2N/A * @param cbNeedle Size of the search byte string. 2N/A * @param pHitAddress Where to put the address of the first hit. 2N/A * Validate the input we use, PGM does the rest. 2N/A * Select DBGF worker by addressing mode. 2N/A * Scan guest memory for an exact byte string. 2N/A * @returns VBox status codes: 2N/A * @retval VINF_SUCCESS and *pGCPtrHit on success. 2N/A * @retval VERR_DBGF_MEM_NOT_FOUND if not found. 2N/A * @retval VERR_INVALID_POINTER if any of the pointer arguments are invalid. 2N/A * @retval VERR_INVALID_ARGUMENT if any other arguments are invalid. 2N/A * @param pVM The VM handle. 2N/A * @param pAddress Where to store the mixed address. 2N/A * @param cbRange The number of bytes to scan. 2N/A * @param pabNeedle What to search for - exact search. 2N/A * @param cbNeedle Size of the search byte string. 2N/A * @param pHitAddress Where to put the address of the first hit. 2N/A * @thread Any thread. 2N/A * Read guest memory. 2N/A * @returns VBox status code. 2N/A * @param pVM Pointer to the shared VM structure. 2N/A * @param pAddress Where to start reading. 2N/A * @param pvBuf Where to store the data we've read. 2N/A * @param cbRead The number of bytes to read. 2N/A * Validate the input we use, PGM does the rest. 2N/A * Select DBGF worker by addressing mode. 2N/A * Read guest memory. 2N/A * @returns VBox status code. 2N/A * @param pVM Pointer to the shared VM structure. 2N/A * @param pAddress Where to start reading. 2N/A * @param pvBuf Where to store the data we've read. 2N/A * @param cbRead The number of bytes to read. 2N/A * Read a zero terminated string from guest memory. 2N/A * @returns VBox status code. 2N/A * @param pVM Pointer to the shared VM structure. 2N/A * @param pAddress Where to start reading. 2N/A * @param pszBuf Where to store the string. 2N/A * @param cchBuf The size of the buffer. 2N/A * Validate the input we use, PGM does the rest. 2N/A * Select DBGF worker by addressing mode. 2N/A * Make sure the result is terminated and that overflow is signaled. 2N/A * Handle partial reads (not perfect). 2N/A * Read a zero terminated string from guest memory. 2N/A * @returns VBox status code. 2N/A * @param pVM Pointer to the shared VM structure. 2N/A * @param pAddress Where to start reading. 2N/A * @param pszBuf Where to store the string. 2N/A * @param cchBuf The size of the buffer. 2N/A * Validate and zero output. 2N/A * Pass it on to the EMT.