diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
|---|---|---|
| committer | <> | 2014-05-08 15:03:54 +0000 |
| commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
| tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp | |
| parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
| download | VirtualBox-master.tar.gz | |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp')
| -rw-r--r-- | src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp b/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp index b4ca067f..21a4e92a 100644 --- a/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp +++ b/src/VBox/VMM/VMMR3/DBGFCoreWrite.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2010 Oracle Corporation + * Copyright (C) 2010-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; @@ -54,14 +54,15 @@ #include "DBGFInternal.h" #include <VBox/vmm/cpum.h> -#include "CPUMInternal.h" +#include <VBox/vmm/pgm.h> #include <VBox/vmm/dbgf.h> #include <VBox/vmm/dbgfcorefmt.h> +#include <VBox/vmm/mm.h> #include <VBox/vmm/vm.h> -#include <VBox/vmm/pgm.h> +#include <VBox/vmm/uvm.h> + #include <VBox/err.h> #include <VBox/log.h> -#include <VBox/vmm/mm.h> #include <VBox/version.h> #include "../../Runtime/include/internal/ldrELF64.h" @@ -426,10 +427,12 @@ static int dbgfR3CoreWriteWorker(PVM pVM, RTFILE hFile) /* * Write the CPU context note headers and data. */ + /** @todo r=ramshankar: Dump a more standardized CPU structure rather than + * dumping CPUMCTX and bump the core file version number. */ Assert(RTFileTell(hFile) == offCpuDumps); for (uint32_t iCpu = 0; iCpu < pVM->cCpus; iCpu++) { - PCPUMCTX pCpuCtx = &pVM->aCpus[iCpu].cpum.s.Guest; + PCPUMCTX pCpuCtx = CPUMQueryGuestCtxPtr(&pVM->aCpus[iCpu]); rc = Elf64WriteNoteHdr(hFile, NT_VBOXCPU, s_pcszCoreVBoxCpu, pCpuCtx, sizeof(CPUMCTX)); if (RT_FAILURE(rc)) { @@ -533,16 +536,19 @@ static DECLCALLBACK(VBOXSTRICTRC) dbgfR3CoreWriteRendezvous(PVM pVM, PVMCPU pVCp * Write core dump of the guest. * * @returns VBox status code. - * @param pVM Pointer to the VM. + * @param pUVM The user mode VM handle. * @param pszFilename The name of the file to which the guest core * dump should be written. * @param fReplaceFile Whether to replace the file or not. * - * @remarks The VM should be suspended before calling this function or DMA may - * interfer with the state. + * @remarks The VM may need to be suspended before calling this function in + * order to truly stop all device threads and drivers. This function + * only synchronizes EMTs. */ -VMMR3DECL(int) DBGFR3CoreWrite(PVM pVM, const char *pszFilename, bool fReplaceFile) +VMMR3DECL(int) DBGFR3CoreWrite(PUVM pUVM, const char *pszFilename, bool fReplaceFile) { + UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); + PVM pVM = pUVM->pVM; VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); AssertReturn(pszFilename, VERR_INVALID_HANDLE); |
