1 | /* $Id: AllPdbTypeHack.cpp 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Debug info hack for the VM and VMCPU structures.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2016-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 | #include <VBox/vmm/cfgm.h>
|
---|
23 | #include <VBox/vmm/cpum.h>
|
---|
24 | #include <VBox/vmm/mm.h>
|
---|
25 | #include <VBox/vmm/pgm.h>
|
---|
26 | #include <VBox/vmm/selm.h>
|
---|
27 | #include <VBox/vmm/trpm.h>
|
---|
28 | #include <VBox/vmm/vmm.h>
|
---|
29 | #include <VBox/vmm/stam.h>
|
---|
30 | #include "../include/PDMInternal.h"
|
---|
31 | #include <VBox/vmm/pdm.h>
|
---|
32 | #include "../include/CFGMInternal.h"
|
---|
33 | #include "../include/CPUMInternal.h"
|
---|
34 | #include "../include/MMInternal.h"
|
---|
35 | #include "../include/PGMInternal.h"
|
---|
36 | #include "../include/SELMInternal.h"
|
---|
37 | #include "../include/TRPMInternal.h"
|
---|
38 | #include "../include/TMInternal.h"
|
---|
39 | #include "../include/IOMInternal.h"
|
---|
40 | #ifdef IN_RING3
|
---|
41 | # include "../include/SSMInternal.h"
|
---|
42 | #endif
|
---|
43 | #include "../include/HMInternal.h"
|
---|
44 | #include "../include/VMMInternal.h"
|
---|
45 | #include "../include/DBGFInternal.h"
|
---|
46 | #include "../include/GIMInternal.h"
|
---|
47 | #include "../include/APICInternal.h"
|
---|
48 | #include "../include/STAMInternal.h"
|
---|
49 | #include "../include/VMInternal.h"
|
---|
50 | #include "../include/EMInternal.h"
|
---|
51 | #include "../include/IEMInternal.h"
|
---|
52 | #include "../include/NEMInternal.h"
|
---|
53 | #include "../VMMR0/GMMR0Internal.h"
|
---|
54 | #include "../VMMR0/GVMMR0Internal.h"
|
---|
55 | #include <VBox/vmm/vmcc.h>
|
---|
56 | #ifdef IN_RING3
|
---|
57 | # include <VBox/vmm/uvm.h>
|
---|
58 | #endif
|
---|
59 | #include <VBox/vmm/gvm.h>
|
---|
60 |
|
---|
61 |
|
---|
62 | extern "C" {
|
---|
63 |
|
---|
64 | /* Global pointer variables as an alternative to the parameter list. Just to ensure the precense of the types. */
|
---|
65 | PVM g_PdbTypeHack1 = NULL;
|
---|
66 | PVMCPU g_PdbTypeHack2 = NULL;
|
---|
67 | PPDMCRITSECT g_PdbTypeHack3 = NULL;
|
---|
68 | PPDMCRITSECTRW g_PdbTypeHack4 = NULL;
|
---|
69 | PPDMDEVINS g_PdbTypeHack5 = NULL;
|
---|
70 | PPDMDRVINS g_PdbTypeHack6 = NULL;
|
---|
71 | PPDMUSBINS g_PdbTypeHack7 = NULL;
|
---|
72 | PCVMCPU g_PdbTypeHack8 = NULL;
|
---|
73 | CTX_SUFF(PVM) g_PdbTypeHack9 = NULL;
|
---|
74 | CTX_SUFF(PVMCPU) g_PdbTypeHack10 = NULL;
|
---|
75 |
|
---|
76 | DECLEXPORT(uint32_t) PdbTypeHack(PVM pVM, PVMCPU pVCpu, PPDMCRITSECT pCs1, PPDMCRITSECTRW pCs2);
|
---|
77 | }
|
---|
78 |
|
---|
79 | DECLEXPORT(uint32_t) PdbTypeHack(PVM pVM, PVMCPU pVCpu, PPDMCRITSECT pCs1, PPDMCRITSECTRW pCs2)
|
---|
80 | {
|
---|
81 | /* Just some dummy operations accessing each type. Probably not necessary, but
|
---|
82 | helps making sure we've included all we need to get at the internal stuff.. */
|
---|
83 | return pVM->fGlobalForcedActions
|
---|
84 | | (pVM == g_PdbTypeHack1)
|
---|
85 | | (pVM == g_PdbTypeHack9)
|
---|
86 | | pVCpu->fLocalForcedActions
|
---|
87 | | (pVCpu == g_PdbTypeHack2)
|
---|
88 | | (pVCpu == g_PdbTypeHack8)
|
---|
89 | | (pVCpu == g_PdbTypeHack10)
|
---|
90 | | pCs1->s.Core.fFlags
|
---|
91 | | (pCs1 == g_PdbTypeHack3)
|
---|
92 | | pCs2->s.Core.fFlags
|
---|
93 | | (pCs2 == g_PdbTypeHack4)
|
---|
94 | | g_PdbTypeHack5->Internal.s.idxR0Device
|
---|
95 | | (g_PdbTypeHack5 != NULL)
|
---|
96 | | (uint32_t)g_PdbTypeHack6->Internal.s.fDetaching
|
---|
97 | | (g_PdbTypeHack6 != NULL)
|
---|
98 | | (uint32_t)g_PdbTypeHack7->Internal.s.fVMSuspended
|
---|
99 | | (g_PdbTypeHack7 != NULL);
|
---|
100 | }
|
---|
101 |
|
---|