VirtualBox

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

Last change on this file since 44528 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • 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 44528 2013-02-04 14:27:54Z 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(PAEEnabled))(BOOL *a_pfEnabled);
76 STDMETHOD(COMGETTER(OSName))(BSTR *a_pbstrName);
77 STDMETHOD(COMGETTER(OSVersion))(BSTR *a_pbstrVersion);
78 STDMETHOD(COMGETTER(VirtualTimeRate))(ULONG *a_puPct);
79 STDMETHOD(COMSETTER(VirtualTimeRate))(ULONG a_uPct);
80 STDMETHOD(COMGETTER(VM))(LONG64 *a_u64Vm);
81
82 // IMachineDebugger methods
83 STDMETHOD(DumpGuestCore)(IN_BSTR a_bstrFilename, IN_BSTR a_bstrCompression);
84 STDMETHOD(DumpHostProcessCore)(IN_BSTR a_bstrFilename, IN_BSTR a_bstrCompression);
85 STDMETHOD(Info)(IN_BSTR a_bstrName, IN_BSTR a_bstrArgs, BSTR *a_bstrInfo);
86 STDMETHOD(InjectNMI)();
87 STDMETHOD(ModifyLogFlags)(IN_BSTR a_bstrSettings);
88 STDMETHOD(ModifyLogGroups)(IN_BSTR a_bstrSettings);
89 STDMETHOD(ModifyLogDestinations)(IN_BSTR a_bstrSettings);
90 STDMETHOD(ReadPhysicalMemory)(LONG64 a_Address, ULONG a_cbRead, ComSafeArrayOut(BYTE, a_abData));
91 STDMETHOD(WritePhysicalMemory)(LONG64 a_Address, ULONG a_cbRead, ComSafeArrayIn(BYTE, a_abData));
92 STDMETHOD(ReadVirtualMemory)(ULONG a_idCpu, LONG64 a_Address, ULONG a_cbRead, ComSafeArrayOut(BYTE, a_abData));
93 STDMETHOD(WriteVirtualMemory)(ULONG a_idCpu, LONG64 a_Address, ULONG a_cbRead, ComSafeArrayIn(BYTE, a_abData));
94 STDMETHOD(DetectOS)(BSTR *a_pbstrName);
95 STDMETHOD(GetRegister)(ULONG a_idCpu, IN_BSTR a_bstrName, BSTR *a_pbstrValue);
96 STDMETHOD(GetRegisters)(ULONG a_idCpu, ComSafeArrayOut(BSTR, a_bstrNames), ComSafeArrayOut(BSTR, a_bstrValues));
97 STDMETHOD(SetRegister)(ULONG a_idCpu, IN_BSTR a_bstrName, IN_BSTR a_bstrValue);
98 STDMETHOD(SetRegisters)(ULONG a_idCpu, ComSafeArrayIn(IN_BSTR, a_bstrNames), ComSafeArrayIn(IN_BSTR, a_bstrValues));
99 STDMETHOD(DumpGuestStack)(ULONG a_idCpu, BSTR *a_pbstrStack);
100 STDMETHOD(ResetStats)(IN_BSTR aPattern);
101 STDMETHOD(DumpStats)(IN_BSTR aPattern);
102 STDMETHOD(GetStats)(IN_BSTR aPattern, BOOL aWithDescriptions, BSTR *aStats);
103
104
105 // "public-private methods"
106 void flushQueuedSettings();
107
108private:
109 // private methods
110 bool queueSettings() const;
111
112 /** RTLogGetFlags, RTLogGetGroupSettings and RTLogGetDestinations function. */
113 typedef DECLCALLBACK(int) FNLOGGETSTR(PRTLOGGER, char *, size_t);
114 /** Function pointer. */
115 typedef FNLOGGETSTR *PFNLOGGETSTR;
116 HRESULT logStringProps(PRTLOGGER pLogger, PFNLOGGETSTR pfnLogGetStr, const char *pszLogGetStr, BSTR *a_bstrSettings);
117
118 Console * const mParent;
119 /** @name Flags whether settings have been queued because they could not be sent
120 * to the VM (not up yet, etc.)
121 * @{ */
122 int mSingleStepQueued;
123 int mRecompileUserQueued;
124 int mRecompileSupervisorQueued;
125 int mPatmEnabledQueued;
126 int mCsamEnabledQueued;
127 int mLogEnabledQueued;
128 uint32_t mVirtualTimeRateQueued;
129 bool mFlushMode;
130 /** @} */
131};
132
133#endif /* !____H_MACHINEDEBUGGER */
134/* 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