1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox COM class implementation
|
---|
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 | #ifndef ____H_MACHINEDEBUGGER
|
---|
23 | #define ____H_MACHINEDEBUGGER
|
---|
24 |
|
---|
25 | #include "VirtualBoxBase.h"
|
---|
26 |
|
---|
27 | class Console;
|
---|
28 |
|
---|
29 | class ATL_NO_VTABLE MachineDebugger :
|
---|
30 | public VirtualBoxSupportErrorInfoImpl <MachineDebugger, IMachineDebugger>,
|
---|
31 | public VirtualBoxSupportTranslation <MachineDebugger>,
|
---|
32 | public VirtualBoxBase,
|
---|
33 | public IMachineDebugger
|
---|
34 | {
|
---|
35 | public:
|
---|
36 |
|
---|
37 | DECLARE_NOT_AGGREGATABLE(MachineDebugger)
|
---|
38 |
|
---|
39 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
40 |
|
---|
41 | BEGIN_COM_MAP(MachineDebugger)
|
---|
42 | COM_INTERFACE_ENTRY(ISupportErrorInfo)
|
---|
43 | COM_INTERFACE_ENTRY(IMachineDebugger)
|
---|
44 | END_COM_MAP()
|
---|
45 |
|
---|
46 | NS_DECL_ISUPPORTS
|
---|
47 |
|
---|
48 | HRESULT FinalConstruct();
|
---|
49 | void FinalRelease();
|
---|
50 |
|
---|
51 | // public initializer/uninitializer for internal purposes only
|
---|
52 | HRESULT init (Console *parent);
|
---|
53 | void uninit();
|
---|
54 |
|
---|
55 | // IMachineDebugger properties
|
---|
56 | STDMETHOD(COMGETTER(Singlestep))(BOOL *enabled);
|
---|
57 | STDMETHOD(COMSETTER(Singlestep))(BOOL enable);
|
---|
58 | STDMETHOD(COMGETTER(RecompileUser))(BOOL *enabled);
|
---|
59 | STDMETHOD(COMSETTER(RecompileUser))(BOOL enable);
|
---|
60 | STDMETHOD(COMGETTER(RecompileSupervisor))(BOOL *enabled);
|
---|
61 | STDMETHOD(COMSETTER(RecompileSupervisor))(BOOL enable);
|
---|
62 | STDMETHOD(COMGETTER(PATMEnabled))(BOOL *enabled);
|
---|
63 | STDMETHOD(COMSETTER(PATMEnabled))(BOOL enable);
|
---|
64 | STDMETHOD(COMGETTER(CSAMEnabled))(BOOL *enabled);
|
---|
65 | STDMETHOD(COMSETTER(CSAMEnabled))(BOOL enable);
|
---|
66 | STDMETHOD(COMGETTER(LogEnabled))(BOOL *enabled);
|
---|
67 | STDMETHOD(COMSETTER(LogEnabled))(BOOL enable);
|
---|
68 | STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);
|
---|
69 | STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *enabled);
|
---|
70 | STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled);
|
---|
71 | STDMETHOD(COMGETTER(VirtualTimeRate))(ULONG *pct);
|
---|
72 | STDMETHOD(COMSETTER(VirtualTimeRate))(ULONG pct);
|
---|
73 | STDMETHOD(COMGETTER(VM))(ULONG64 *vm);
|
---|
74 |
|
---|
75 | // IMachineDebugger methods
|
---|
76 | STDMETHOD(ResetStats(INPTR BSTR aPattern));
|
---|
77 | STDMETHOD(DumpStats(INPTR BSTR aPattern));
|
---|
78 | STDMETHOD(GetStats(INPTR BSTR aPattern, BOOL aWithDescriptions, BSTR *aStats));
|
---|
79 |
|
---|
80 |
|
---|
81 | // "public-private methods"
|
---|
82 | void flushQueuedSettings();
|
---|
83 |
|
---|
84 | // for VirtualBoxSupportErrorInfoImpl
|
---|
85 | static const wchar_t *getComponentName() { return L"MachineDebugger"; }
|
---|
86 |
|
---|
87 | private:
|
---|
88 | ComObjPtr <Console, ComWeakRef> mParent;
|
---|
89 | // flags whether settings have been queued because
|
---|
90 | // they could not be sent to the VM (not up yet, etc.)
|
---|
91 | int singlestepQueued;
|
---|
92 | int recompileUserQueued;
|
---|
93 | int recompileSupervisorQueued;
|
---|
94 | int patmEnabledQueued;
|
---|
95 | int csamEnabledQueued;
|
---|
96 | int mLogEnabledQueued;
|
---|
97 | uint32_t mVirtualTimeRateQueued;
|
---|
98 | bool fFlushMode;
|
---|
99 | };
|
---|
100 |
|
---|
101 | #endif // ____H_MACHINEDEBUGGER
|
---|