VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR0/DBGFR0.cpp@ 95248

Last change on this file since 95248 was 93655, checked in by vboxsync, 3 years ago

VMM/TM,VMM/*: Moved RTTIMENANOTSDATAR0 into the ring-0 only part of the VM structure. Added a VMCC_CTX macro for selecting between tm and tmr0 VM components depending on the compilation context. Added a bunch of missing padding checks for GVM. bugref:10094

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/* $Id: DBGFR0.cpp 93655 2022-02-08 13:56:01Z vboxsync $ */
2/** @file
3 * DBGF - Debugger Facility, R0 part.
4 */
5
6/*
7 * Copyright (C) 2020-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP LOG_GROUP_DBGF
23#include "DBGFInternal.h"
24#include <VBox/vmm/gvm.h>
25#include <VBox/vmm/gvmm.h>
26#include <VBox/vmm/vmm.h>
27
28#include <VBox/log.h>
29#include <VBox/sup.h>
30#include <iprt/asm.h>
31#include <iprt/assert.h>
32#include <iprt/errcore.h>
33#include <iprt/ctype.h>
34#include <iprt/mem.h>
35#include <iprt/memobj.h>
36#include <iprt/process.h>
37#include <iprt/string.h>
38
39#include "dtrace/VBoxVMM.h"
40
41
42
43/**
44 * Initializes the per-VM data for the DBGF.
45 *
46 * This is called from under the GVMM lock, so it only need to initialize the
47 * data so DBGFR0CleanupVM and others will work smoothly.
48 *
49 * @param pGVM Pointer to the global VM structure.
50 */
51VMMR0_INT_DECL(void) DBGFR0InitPerVMData(PGVM pGVM)
52{
53 AssertCompile(sizeof(pGVM->dbgfr0.s) <= sizeof(pGVM->dbgfr0.padding));
54 pGVM->dbgfr0.s.pTracerR0 = NULL;
55
56 dbgfR0BpInit(pGVM);
57}
58
59
60/**
61 * Cleans up any loose ends before the GVM structure is destroyed.
62 */
63VMMR0_INT_DECL(void) DBGFR0CleanupVM(PGVM pGVM)
64{
65#ifdef VBOX_WITH_DBGF_TRACING
66 if (pGVM->dbgfr0.s.pTracerR0)
67 dbgfR0TracerDestroy(pGVM, pGVM->dbgfr0.s.pTracerR0);
68 pGVM->dbgfr0.s.pTracerR0 = NULL;
69#endif
70
71 dbgfR0BpDestroy(pGVM);
72}
73
Note: See TracBrowser for help on using the repository browser.

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