1 | /* $Id: MachineDebuggerImpl.h 27607 2010-03-22 18:13:07Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox COM class implementation
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2006-2008 Sun Microsystems, Inc.
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | *
|
---|
19 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
20 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
21 | * additional information or have any questions.
|
---|
22 | */
|
---|
23 |
|
---|
24 | #ifndef ____H_MACHINEDEBUGGER
|
---|
25 | #define ____H_MACHINEDEBUGGER
|
---|
26 |
|
---|
27 | #include "VirtualBoxBase.h"
|
---|
28 |
|
---|
29 | class Console;
|
---|
30 |
|
---|
31 | class ATL_NO_VTABLE MachineDebugger :
|
---|
32 | public VirtualBoxBase,
|
---|
33 | public VirtualBoxSupportErrorInfoImpl<MachineDebugger, IMachineDebugger>,
|
---|
34 | public VirtualBoxSupportTranslation<MachineDebugger>,
|
---|
35 | VBOX_SCRIPTABLE_IMPL(IMachineDebugger)
|
---|
36 | {
|
---|
37 | public:
|
---|
38 |
|
---|
39 | VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (MachineDebugger)
|
---|
40 |
|
---|
41 | DECLARE_NOT_AGGREGATABLE (MachineDebugger)
|
---|
42 |
|
---|
43 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
44 |
|
---|
45 | BEGIN_COM_MAP(MachineDebugger)
|
---|
46 | COM_INTERFACE_ENTRY (ISupportErrorInfo)
|
---|
47 | COM_INTERFACE_ENTRY (IMachineDebugger)
|
---|
48 | COM_INTERFACE_ENTRY (IDispatch)
|
---|
49 | END_COM_MAP()
|
---|
50 |
|
---|
51 | DECLARE_EMPTY_CTOR_DTOR (MachineDebugger)
|
---|
52 |
|
---|
53 | HRESULT FinalConstruct();
|
---|
54 | void FinalRelease();
|
---|
55 |
|
---|
56 | // public initializer/uninitializer for internal purposes only
|
---|
57 | HRESULT init (Console *aParent);
|
---|
58 | void uninit();
|
---|
59 |
|
---|
60 | // IMachineDebugger properties
|
---|
61 | STDMETHOD(COMGETTER(Singlestep)) (BOOL *aEnabled);
|
---|
62 | STDMETHOD(COMSETTER(Singlestep)) (BOOL aEnable);
|
---|
63 | STDMETHOD(COMGETTER(RecompileUser)) (BOOL *aEnabled);
|
---|
64 | STDMETHOD(COMSETTER(RecompileUser)) (BOOL aEnable);
|
---|
65 | STDMETHOD(COMGETTER(RecompileSupervisor)) (BOOL *aEnabled);
|
---|
66 | STDMETHOD(COMSETTER(RecompileSupervisor)) (BOOL aEnable);
|
---|
67 | STDMETHOD(COMGETTER(PATMEnabled)) (BOOL *aEnabled);
|
---|
68 | STDMETHOD(COMSETTER(PATMEnabled)) (BOOL aEnable);
|
---|
69 | STDMETHOD(COMGETTER(CSAMEnabled)) (BOOL *aEnabled);
|
---|
70 | STDMETHOD(COMSETTER(CSAMEnabled)) (BOOL aEnable);
|
---|
71 | STDMETHOD(COMGETTER(LogEnabled)) (BOOL *aEnabled);
|
---|
72 | STDMETHOD(COMSETTER(LogEnabled)) (BOOL aEnable);
|
---|
73 | STDMETHOD(COMGETTER(HWVirtExEnabled)) (BOOL *aEnabled);
|
---|
74 | STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled)) (BOOL *aEnabled);
|
---|
75 | STDMETHOD(COMGETTER(HWVirtExVPIDEnabled)) (BOOL *aEnabled);
|
---|
76 | STDMETHOD(COMGETTER(PAEEnabled)) (BOOL *aEnabled);
|
---|
77 | STDMETHOD(COMGETTER(VirtualTimeRate)) (ULONG *aPct);
|
---|
78 | STDMETHOD(COMSETTER(VirtualTimeRate)) (ULONG aPct);
|
---|
79 | STDMETHOD(COMGETTER(VM)) (ULONG64 *aVm);
|
---|
80 | STDMETHOD(InjectNMI)();
|
---|
81 |
|
---|
82 | // IMachineDebugger methods
|
---|
83 | STDMETHOD(ResetStats (IN_BSTR aPattern));
|
---|
84 | STDMETHOD(DumpStats (IN_BSTR aPattern));
|
---|
85 | STDMETHOD(GetStats (IN_BSTR aPattern, BOOL aWithDescriptions, BSTR *aStats));
|
---|
86 |
|
---|
87 |
|
---|
88 | // "public-private methods"
|
---|
89 | void flushQueuedSettings();
|
---|
90 |
|
---|
91 | // for VirtualBoxSupportErrorInfoImpl
|
---|
92 | static const wchar_t *getComponentName() { return L"MachineDebugger"; }
|
---|
93 |
|
---|
94 | private:
|
---|
95 | // private methods
|
---|
96 | bool queueSettings() const;
|
---|
97 |
|
---|
98 | Console * const mParent;
|
---|
99 | // flags whether settings have been queued because
|
---|
100 | // they could not be sent to the VM (not up yet, etc.)
|
---|
101 | int mSinglestepQueued;
|
---|
102 | int mRecompileUserQueued;
|
---|
103 | int mRecompileSupervisorQueued;
|
---|
104 | int mPatmEnabledQueued;
|
---|
105 | int mCsamEnabledQueued;
|
---|
106 | int mLogEnabledQueued;
|
---|
107 | uint32_t mVirtualTimeRateQueued;
|
---|
108 | bool mFlushMode;
|
---|
109 | };
|
---|
110 |
|
---|
111 | #endif /* ____H_MACHINEDEBUGGER */
|
---|
112 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|