/* $Id: DBGFCoreWrite.cpp 32006 2010-08-26 16:14:33Z vboxsync $ */ /** @file * DBGF - Debugger Facility, Guest Core Dump. */ /* * Copyright (C) 2010 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * 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 #include #include "DBGFInternal.h" #include #include #include /** * EMT worker function for DBGFR3CoreWrite. * * @param pVM The VM handle. * @param idCpu The target CPU ID. * @param pszDumpPath The full path of the file to dump into. * * @return VBox status code. */ static DECLCALLBACK(int) dbgfR3CoreWrite(PVM pVM, VMCPUID idCpu, const char *pszDumpPath) { /* * Validate input. */ Assert(idCpu == VMMGetCpuId(pVM)); AssertReturn(pszDumpPath, VERR_INVALID_POINTER); /* @todo */ return VINF_SUCCESS; } /** * Write core dump of the guest. * * @return VBox status code. * @param pVM The VM handle. * @param idCpu The target CPU ID. * @param pszDumpPath The path of the file to dump into, cannot be * NULL. */ VMMR3DECL(int) DBGFR3CoreWrite(PVM pVM, VMCPUID idCpu, const char *pszDumpPath) { VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID); AssertReturn(pszDumpPath, VERR_INVALID_HANDLE); /* * Pass the core write request down to EMT. */ return VMR3ReqCallWaitU(pVM->pUVM, idCpu, (PFNRT)dbgfR3CoreWrite, 3, pVM, idCpu, pszDumpPath); }