VirtualBox

source: vbox/trunk/src/VBox/Main/include/MachineDebuggerImpl.h@ 45971

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

Main, VMM: Added an API seting to disable VT-x unrestricted execution.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1/* $Id: MachineDebuggerImpl.h 45971 2013-05-09 19:46:52Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2012 Oracle Corporation
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
20#ifndef ____H_MACHINEDEBUGGER
21#define ____H_MACHINEDEBUGGER
22
23#include "VirtualBoxBase.h"
24#include <iprt/log.h>
25
26class Console;
27
28class ATL_NO_VTABLE MachineDebugger :
29 public VirtualBoxBase,
30 VBOX_SCRIPTABLE_IMPL(IMachineDebugger)
31{
32public:
33
34 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT (MachineDebugger, IMachineDebugger)
35
36 DECLARE_NOT_AGGREGATABLE (MachineDebugger)
37
38 DECLARE_PROTECT_FINAL_CONSTRUCT()
39
40 BEGIN_COM_MAP(MachineDebugger)
41 VBOX_DEFAULT_INTERFACE_ENTRIES (IMachineDebugger)
42 END_COM_MAP()
43
44 DECLARE_EMPTY_CTOR_DTOR (MachineDebugger)
45
46 HRESULT FinalConstruct();
47 void FinalRelease();
48
49 // public initializer/uninitializer for internal purposes only
50 HRESULT init (Console *aParent);
51 void uninit();
52
53 // IMachineDebugger properties
54 STDMETHOD(COMGETTER(SingleStep))(BOOL *a_pfEnabled);
55 STDMETHOD(COMSETTER(SingleStep))(BOOL a_fEnable);
56 STDMETHOD(COMGETTER(RecompileUser))(BOOL *a_pfEnabled);
57 STDMETHOD(COMSETTER(RecompileUser))(BOOL a_fEnable);
58 STDMETHOD(COMGETTER(RecompileSupervisor))(BOOL *a_pfEnabled);
59 STDMETHOD(COMSETTER(RecompileSupervisor))(BOOL a_fEnable);
60 STDMETHOD(COMGETTER(PATMEnabled))(BOOL *a_pfEnabled);
61 STDMETHOD(COMSETTER(PATMEnabled))(BOOL a_fEnable);
62 STDMETHOD(COMGETTER(CSAMEnabled))(BOOL *a_pfEnabled);
63 STDMETHOD(COMSETTER(CSAMEnabled))(BOOL a_fEnable);
64 STDMETHOD(COMGETTER(LogEnabled))(BOOL *a_pfEnabled);
65 STDMETHOD(COMSETTER(LogEnabled))(BOOL a_fEnable);
66 STDMETHOD(COMGETTER(LogDbgFlags))(BSTR *a_pbstrSettings);
67 STDMETHOD(COMGETTER(LogDbgGroups))(BSTR *a_pbstrSettings);
68 STDMETHOD(COMGETTER(LogDbgDestinations))(BSTR *a_pbstrSettings);
69 STDMETHOD(COMGETTER(LogRelFlags))(BSTR *a_pbstrSettings);
70 STDMETHOD(COMGETTER(LogRelGroups))(BSTR *a_pbstrSettings);
71 STDMETHOD(COMGETTER(LogRelDestinations))(BSTR *a_pbstrSettings);
72 STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *a_pfEnabled);
73 STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *a_pfEnabled);
74 STDMETHOD(COMGETTER(HWVirtExVPIDEnabled))(BOOL *a_pfEnabled);
75 STDMETHOD(COMGETTER(HWVirtExUXEnabled))(BOOL *a_pfEnabled);
76 STDMETHOD(COMGETTER(PAEEnabled))(BOOL *a_pfEnabled);
77 STDMETHOD(COMGETTER(OSName))(BSTR *a_pbstrName);
78 STDMETHOD(COMGETTER(OSVersion))(BSTR *a_pbstrVersion);
79 STDMETHOD(COMGETTER(VirtualTimeRate))(ULONG *a_puPct);
80 STDMETHOD(COMSETTER(VirtualTimeRate))(ULONG a_uPct);
81 STDMETHOD(COMGETTER(VM))(LONG64 *a_u64Vm);
82
83 // IMachineDebugger methods
84 STDMETHOD(DumpGuestCore)(IN_BSTR a_bstrFilename, IN_BSTR a_bstrCompression);
85 STDMETHOD(DumpHostProcessCore)(IN_BSTR a_bstrFilename, IN_BSTR a_bstrCompression);
86 STDMETHOD(Info)(IN_BSTR a_bstrName, IN_BSTR a_bstrArgs, BSTR *a_bstrInfo);
87 STDMETHOD(InjectNMI)();
88 STDMETHOD(ModifyLogFlags)(IN_BSTR a_bstrSettings);
89 STDMETHOD(ModifyLogGroups)(IN_BSTR a_bstrSettings);
90 STDMETHOD(ModifyLogDestinations)(IN_BSTR a_bstrSettings);
91 STDMETHOD(ReadPhysicalMemory)(LONG64 a_Address, ULONG a_cbRead, ComSafeArrayOut(BYTE, a_abData));
92 STDMETHOD(WritePhysicalMemory)(LONG64 a_Address, ULONG a_cbRead, ComSafeArrayIn(BYTE, a_abData));
93 STDMETHOD(ReadVirtualMemory)(ULONG a_idCpu, LONG64 a_Address, ULONG a_cbRead, ComSafeArrayOut(BYTE, a_abData));
94 STDMETHOD(WriteVirtualMemory)(ULONG a_idCpu, LONG64 a_Address, ULONG a_cbRead, ComSafeArrayIn(BYTE, a_abData));
95 STDMETHOD(DetectOS)(BSTR *a_pbstrName);
96 STDMETHOD(GetRegister)(ULONG a_idCpu, IN_BSTR a_bstrName, BSTR *a_pbstrValue);
97 STDMETHOD(GetRegisters)(ULONG a_idCpu, ComSafeArrayOut(BSTR, a_bstrNames), ComSafeArrayOut(BSTR, a_bstrValues));
98 STDMETHOD(SetRegister)(ULONG a_idCpu, IN_BSTR a_bstrName, IN_BSTR a_bstrValue);
99 STDMETHOD(SetRegisters)(ULONG a_idCpu, ComSafeArrayIn(IN_BSTR, a_bstrNames), ComSafeArrayIn(IN_BSTR, a_bstrValues));
100 STDMETHOD(DumpGuestStack)(ULONG a_idCpu, BSTR *a_pbstrStack);
101 STDMETHOD(ResetStats)(IN_BSTR aPattern);
102 STDMETHOD(DumpStats)(IN_BSTR aPattern);
103 STDMETHOD(GetStats)(IN_BSTR aPattern, BOOL aWithDescriptions, BSTR *aStats);
104
105
106 // "public-private methods"
107 void flushQueuedSettings();
108
109private:
110 // private methods
111 bool queueSettings() const;
112
113 /** RTLogGetFlags, RTLogGetGroupSettings and RTLogGetDestinations function. */
114 typedef DECLCALLBACK(int) FNLOGGETSTR(PRTLOGGER, char *, size_t);
115 /** Function pointer. */
116 typedef FNLOGGETSTR *PFNLOGGETSTR;
117 HRESULT logStringProps(PRTLOGGER pLogger, PFNLOGGETSTR pfnLogGetStr, const char *pszLogGetStr, BSTR *a_bstrSettings);
118
119 Console * const mParent;
120 /** @name Flags whether settings have been queued because they could not be sent
121 * to the VM (not up yet, etc.)
122 * @{ */
123 int mSingleStepQueued;
124 int mRecompileUserQueued;
125 int mRecompileSupervisorQueued;
126 int mPatmEnabledQueued;
127 int mCsamEnabledQueued;
128 int mLogEnabledQueued;
129 uint32_t mVirtualTimeRateQueued;
130 bool mFlushMode;
131 /** @} */
132};
133
134#endif /* !____H_MACHINEDEBUGGER */
135/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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