1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox Debugger GUI, dummy testcase.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
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 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | * additional information or have any questions.
|
---|
20 | */
|
---|
21 |
|
---|
22 |
|
---|
23 | /*******************************************************************************
|
---|
24 | * Header Files *
|
---|
25 | *******************************************************************************/
|
---|
26 | #include <qapplication.h>
|
---|
27 | #include <VBox/dbg.h>
|
---|
28 | #include <VBox/vm.h>
|
---|
29 | #include <VBox/err.h>
|
---|
30 | #include <iprt/runtime.h>
|
---|
31 | #include <VBox/log.h>
|
---|
32 | #include <iprt/assert.h>
|
---|
33 | #include <iprt/runtime.h>
|
---|
34 | #include <iprt/semaphore.h>
|
---|
35 | #include <iprt/stream.h>
|
---|
36 |
|
---|
37 |
|
---|
38 | #define TESTCASE "tstVBoxDbg"
|
---|
39 |
|
---|
40 |
|
---|
41 | int main(int argc, char **argv)
|
---|
42 | {
|
---|
43 | int cErrors = 0; /* error count. */
|
---|
44 |
|
---|
45 | RTR3Init();
|
---|
46 | RTPrintf(TESTCASE ": TESTING...\n");
|
---|
47 |
|
---|
48 | /*
|
---|
49 | * Create empty VM.
|
---|
50 | */
|
---|
51 | PVM pVM;
|
---|
52 | int rc = VMR3Create(NULL, NULL, NULL, NULL, &pVM);
|
---|
53 | if (VBOX_SUCCESS(rc))
|
---|
54 | {
|
---|
55 | /*
|
---|
56 | * Instantiate the debugger GUI bits and run them.
|
---|
57 | */
|
---|
58 | QApplication App(argc, argv);
|
---|
59 | // DBGGuiCreate(pVM, true, NULL);
|
---|
60 | App.exec();
|
---|
61 |
|
---|
62 | /*
|
---|
63 | * Cleanup.
|
---|
64 | */
|
---|
65 | rc = VMR3Destroy(pVM);
|
---|
66 | if (!VBOX_SUCCESS(rc))
|
---|
67 | {
|
---|
68 | RTPrintf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
|
---|
69 | cErrors++;
|
---|
70 | }
|
---|
71 | }
|
---|
72 | else
|
---|
73 | {
|
---|
74 | RTPrintf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
|
---|
75 | cErrors++;
|
---|
76 | }
|
---|
77 |
|
---|
78 | /*
|
---|
79 | * Summay and exit.
|
---|
80 | */
|
---|
81 | if (!cErrors)
|
---|
82 | RTPrintf(TESTCASE ": SUCCESS\n");
|
---|
83 | else
|
---|
84 | RTPrintf(TESTCASE ": FAILURE - %d errors\n", cErrors);
|
---|
85 | return !!cErrors;
|
---|
86 | }
|
---|
87 |
|
---|