VirtualBox

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

Last change on this file since 49498 was 46942, checked in by vboxsync, 11 years ago

VMM: Fix LDTR restoration to be done dynamically. This is required for 64-bit Darwin hosts.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.8 KB
Line 
1/* $Id: tstVMStructRC.cpp 46942 2013-07-03 14:53:47Z 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-2012 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_TSTVMSTRUCTGC 1
53#include <VBox/vmm/cfgm.h>
54#include <VBox/vmm/cpum.h>
55#include <VBox/vmm/mm.h>
56#include <VBox/vmm/pgm.h>
57#include <VBox/vmm/selm.h>
58#include <VBox/vmm/trpm.h>
59#include <VBox/vmm/vmm.h>
60#include <VBox/vmm/stam.h>
61#include "PDMInternal.h"
62#include <VBox/vmm/pdm.h>
63#include "CFGMInternal.h"
64#include "CPUMInternal.h"
65#include "MMInternal.h"
66#include "PGMInternal.h"
67#include "SELMInternal.h"
68#include "TRPMInternal.h"
69#include "TMInternal.h"
70#include "IOMInternal.h"
71#include "REMInternal.h"
72#include "HMInternal.h"
73#include "PATMInternal.h"
74#include "VMMInternal.h"
75#include "DBGFInternal.h"
76#include "STAMInternal.h"
77#include "CSAMInternal.h"
78#include "EMInternal.h"
79#include "IEMInternal.h"
80#include "REMInternal.h"
81#include <VBox/vmm/vm.h>
82#include <VBox/vmm/hm_vmx.h>
83#include <VBox/param.h>
84#include <iprt/x86.h>
85#include <iprt/assert.h>
86
87/* we don't use iprt here because we're pretending to be in GC! */
88#include <stdio.h>
89
90
91int main()
92{
93#define GEN_CHECK_SIZE(s) printf(" CHECK_SIZE(%s, %u);\n", #s, (unsigned)sizeof(s))
94#define GEN_CHECK_OFF(s, m) printf(" CHECK_OFF(%s, %u, %s);\n", #s, (unsigned)RT_OFFSETOF(s, m), #m)
95#define GEN_CHECK_OFF_DOT(s, m) printf(" CHECK_OFF(%s, %u, %s);\n", #s, (unsigned)RT_OFFSETOF(s, m), #m)
96#include "tstVMStruct.h"
97 return (0);
98}
99
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