VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp@ 78382

Last change on this file since 78382 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.1 KB
Line 
1/* $Id: tstVMStructRC.cpp 76553 2019-01-01 01:45:53Z vboxsync $ */
2/** @file
3 * tstVMMStructRC - Generate structure member and size checks from the
4 * RC perspective.
5 *
6 * This is built using the VBOXRC template but linked into a host
7 * ring-3 executable, rather hacky.
8 */
9
10/*
11 * Copyright (C) 2006-2019 Oracle Corporation
12 *
13 * This file is part of VirtualBox Open Source Edition (OSE), as
14 * available from http://www.virtualbox.org. This file is free software;
15 * you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License (GPL) as published by the Free Software
17 * Foundation, in version 2 as it comes in the "COPYING" file of the
18 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20 */
21
22
23/*
24 * Sanity checks.
25 */
26#ifndef IN_RC
27# error Incorrect template!
28#endif
29#if defined(IN_RING3) || defined(IN_RING0)
30# error Incorrect template!
31#endif
32
33#include <VBox/types.h>
34#include <iprt/assert.h>
35AssertCompileSize(uint8_t, 1);
36AssertCompileSize(uint16_t, 2);
37AssertCompileSize(uint32_t, 4);
38AssertCompileSize(uint64_t, 8);
39AssertCompileSize(RTRCPTR, 4);
40#ifdef VBOX_WITH_64_BITS_GUESTS
41AssertCompileSize(RTGCPTR, 8);
42#else
43AssertCompileSize(RTGCPTR, 4);
44#endif
45AssertCompileSize(RTGCPHYS, 8);
46AssertCompileSize(RTHCPHYS, 8);
47
48
49/*********************************************************************************************************************************
50* Header Files *
51*********************************************************************************************************************************/
52#define IN_TSTVMSTRUCT 1
53#define IN_TSTVMSTRUCTGC 1
54#include <VBox/vmm/cfgm.h>
55#include <VBox/vmm/cpum.h>
56#include <VBox/vmm/mm.h>
57#include <VBox/vmm/pgm.h>
58#include <VBox/vmm/selm.h>
59#include <VBox/vmm/trpm.h>
60#include <VBox/vmm/vmm.h>
61#include <VBox/vmm/stam.h>
62#include "PDMInternal.h"
63#include <VBox/vmm/pdm.h>
64#include "CFGMInternal.h"
65#include "CPUMInternal.h"
66#include "MMInternal.h"
67#include "PGMInternal.h"
68#include "SELMInternal.h"
69#include "TRPMInternal.h"
70#include "TMInternal.h"
71#include "IOMInternal.h"
72#include "REMInternal.h"
73#include "HMInternal.h"
74#include "APICInternal.h"
75#include "PATMInternal.h"
76#include "VMMInternal.h"
77#include "DBGFInternal.h"
78#include "GIMInternal.h"
79#include "STAMInternal.h"
80#include "CSAMInternal.h"
81#include "EMInternal.h"
82#include "IEMInternal.h"
83#include "REMInternal.h"
84#include "NEMInternal.h"
85#include <VBox/vmm/vm.h>
86#include <VBox/vmm/hm_vmx.h>
87#include <VBox/param.h>
88#include <iprt/x86.h>
89#include <iprt/assert.h>
90
91/* we don't use iprt here because we're pretending to be in GC! */
92#include <stdio.h>
93
94
95int main()
96{
97#define GEN_CHECK_SIZE(s) printf(" CHECK_SIZE(%s, %u);\n", #s, (unsigned)sizeof(s))
98#define GEN_CHECK_OFF(s, m) printf(" CHECK_OFF(%s, %u, %s);\n", #s, (unsigned)RT_OFFSETOF(s, m), #m)
99#define GEN_CHECK_OFF_DOT(s, m) printf(" CHECK_OFF(%s, %u, %s);\n", #s, (unsigned)RT_OFFSETOF(s, m), #m)
100#include "tstVMStruct.h"
101 return (0);
102}
103
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