VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructs.cpp@ 95421

Last change on this file since 95421 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.0 KB
Line 
1/* $Id: tstAsmStructs.cpp 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * Testcase for checking offsets in the assembly structures shared with C/C++.
4 */
5
6/*
7 * Copyright (C) 2006-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/cpum.h>
23#include "CPUMInternal.h"
24#define IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS 1 /* For HMInternal */
25#include "HMInternal.h"
26#undef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS /* probably not necessary */
27#include "VMMInternal.h"
28#include <VBox/vmm/vm.h>
29#define GVM_C_STYLE_STRUCTURES
30#include <VBox/vmm/gvm.h>
31#include <VBox/vmm/hm_vmx.h>
32
33#include "tstHelp.h"
34#include <stdio.h>
35
36/* Hack for validating nested HMCPU structures. */
37typedef HMCPU::HMCPUVMX HMCPUVMX;
38typedef HMCPU::HMCPUSVM HMCPUSVM;
39typedef HMR0PERVCPU::HMR0CPUVMX HMR0CPUVMX;
40typedef HMR0PERVCPU::HMR0CPUSVM HMR0CPUSVM;
41
42/* For sup.mac simplifications. */
43#define SUPDRVTRACERUSRCTX32 SUPDRVTRACERUSRCTX
44#define SUPDRVTRACERUSRCTX64 SUPDRVTRACERUSRCTX
45
46
47int main()
48{
49 int rc = 0;
50 printf("tstAsmStructs: TESTING\n");
51
52#ifdef IN_RING3
53# include "tstAsmStructsHC.h"
54#else
55# include "tstAsmStructsRC.h"
56#endif
57
58 if (rc)
59 printf("tstAsmStructs: FAILURE - %d errors \n", rc);
60 else
61 printf("tstAsmStructs: SUCCESS\n");
62 return rc;
63}
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