VirtualBox

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

Last change on this file since 75574 was 72328, checked in by vboxsync, 6 years ago

Main: Added read-only ExecutionEngine attribute to IMachineDebugger to expose VM::bMainExecutionEngine to API clients. bugref:9044

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.5 KB
Line 
1/* $Id: MachineDebuggerImpl.h 72328 2018-05-24 19:29:45Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2017 Oracle Corporation
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
18#ifndef ____H_MACHINEDEBUGGER
19#define ____H_MACHINEDEBUGGER
20
21#include "MachineDebuggerWrap.h"
22#include <iprt/log.h>
23#include <VBox/vmm/em.h>
24
25class Console;
26
27class ATL_NO_VTABLE MachineDebugger :
28 public MachineDebuggerWrap
29{
30
31public:
32
33 DECLARE_EMPTY_CTOR_DTOR (MachineDebugger)
34
35 HRESULT FinalConstruct();
36 void FinalRelease();
37
38 // public initializer/uninitializer for internal purposes only
39 HRESULT init (Console *aParent);
40 void uninit();
41
42 // "public-private methods"
43 void i_flushQueuedSettings();
44
45private:
46
47 // wrapped IMachineDeugger properties
48 HRESULT getSingleStep(BOOL *aSingleStep);
49 HRESULT setSingleStep(BOOL aSingleStep);
50 HRESULT getRecompileUser(BOOL *aRecompileUser);
51 HRESULT setRecompileUser(BOOL aRecompileUser);
52 HRESULT getRecompileSupervisor(BOOL *aRecompileSupervisor);
53 HRESULT setRecompileSupervisor(BOOL aRecompileSupervisor);
54 HRESULT getExecuteAllInIEM(BOOL *aExecuteAllInIEM);
55 HRESULT setExecuteAllInIEM(BOOL aExecuteAllInIEM);
56 HRESULT getPATMEnabled(BOOL *aPATMEnabled);
57 HRESULT setPATMEnabled(BOOL aPATMEnabled);
58 HRESULT getCSAMEnabled(BOOL *aCSAMEnabled);
59 HRESULT setCSAMEnabled(BOOL aCSAMEnabled);
60 HRESULT getLogEnabled(BOOL *aLogEnabled);
61 HRESULT setLogEnabled(BOOL aLogEnabled);
62 HRESULT getLogDbgFlags(com::Utf8Str &aLogDbgFlags);
63 HRESULT getLogDbgGroups(com::Utf8Str &aLogDbgGroups);
64 HRESULT getLogDbgDestinations(com::Utf8Str &aLogDbgDestinations);
65 HRESULT getLogRelFlags(com::Utf8Str &aLogRelFlags);
66 HRESULT getLogRelGroups(com::Utf8Str &aLogRelGroups);
67 HRESULT getLogRelDestinations(com::Utf8Str &aLogRelDestinations);
68 HRESULT getExecutionEngine(VMExecutionEngine_T *apenmEngine);
69 HRESULT getHWVirtExEnabled(BOOL *aHWVirtExEnabled);
70 HRESULT getHWVirtExNestedPagingEnabled(BOOL *aHWVirtExNestedPagingEnabled);
71 HRESULT getHWVirtExVPIDEnabled(BOOL *aHWVirtExVPIDEnabled);
72 HRESULT getHWVirtExUXEnabled(BOOL *aHWVirtExUXEnabled);
73 HRESULT getOSName(com::Utf8Str &aOSName);
74 HRESULT getOSVersion(com::Utf8Str &aOSVersion);
75 HRESULT getPAEEnabled(BOOL *aPAEEnabled);
76 HRESULT getVirtualTimeRate(ULONG *aVirtualTimeRate);
77 HRESULT setVirtualTimeRate(ULONG aVirtualTimeRate);
78 HRESULT getVM(LONG64 *aVM);
79 HRESULT getUptime(LONG64 *aUptime);
80
81 // wrapped IMachineDeugger properties
82 HRESULT dumpGuestCore(const com::Utf8Str &aFilename,
83 const com::Utf8Str &aCompression);
84 HRESULT dumpHostProcessCore(const com::Utf8Str &aFilename,
85 const com::Utf8Str &aCompression);
86 HRESULT info(const com::Utf8Str &aName,
87 const com::Utf8Str &aArgs,
88 com::Utf8Str &aInfo);
89 HRESULT injectNMI();
90 HRESULT modifyLogGroups(const com::Utf8Str &aSettings);
91 HRESULT modifyLogFlags(const com::Utf8Str &aSettings);
92 HRESULT modifyLogDestinations(const com::Utf8Str &aSettings);
93 HRESULT readPhysicalMemory(LONG64 aAddress,
94 ULONG aSize,
95 std::vector<BYTE> &aBytes);
96 HRESULT writePhysicalMemory(LONG64 aAddress,
97 ULONG aSize,
98 const std::vector<BYTE> &aBytes);
99 HRESULT readVirtualMemory(ULONG aCpuId,
100 LONG64 aAddress,
101 ULONG aSize,
102 std::vector<BYTE> &aBytes);
103 HRESULT writeVirtualMemory(ULONG aCpuId,
104 LONG64 aAddress,
105 ULONG aSize,
106 const std::vector<BYTE> &aBytes);
107 HRESULT loadPlugIn(const com::Utf8Str &aName,
108 com::Utf8Str &aPlugInName);
109 HRESULT unloadPlugIn(const com::Utf8Str &aName);
110 HRESULT detectOS(com::Utf8Str &aOs);
111 HRESULT queryOSKernelLog(ULONG aMaxMessages,
112 com::Utf8Str &aDmesg);
113 HRESULT getRegister(ULONG aCpuId,
114 const com::Utf8Str &aName,
115 com::Utf8Str &aValue);
116 HRESULT getRegisters(ULONG aCpuId,
117 std::vector<com::Utf8Str> &aNames,
118 std::vector<com::Utf8Str> &aValues);
119 HRESULT setRegister(ULONG aCpuId,
120 const com::Utf8Str &aName,
121 const com::Utf8Str &aValue);
122 HRESULT setRegisters(ULONG aCpuId,
123 const std::vector<com::Utf8Str> &aNames,
124 const std::vector<com::Utf8Str> &aValues);
125 HRESULT dumpGuestStack(ULONG aCpuId,
126 com::Utf8Str &aStack);
127 HRESULT resetStats(const com::Utf8Str &aPattern);
128 HRESULT dumpStats(const com::Utf8Str &aPattern);
129 HRESULT getStats(const com::Utf8Str &aPattern,
130 BOOL aWithDescriptions,
131 com::Utf8Str &aStats);
132
133 // private methods
134 bool i_queueSettings() const;
135 HRESULT i_getEmExecPolicyProperty(EMEXECPOLICY enmPolicy, BOOL *pfEnforced);
136 HRESULT i_setEmExecPolicyProperty(EMEXECPOLICY enmPolicy, BOOL fEnforce);
137
138 /** RTLogGetFlags, RTLogGetGroupSettings and RTLogGetDestinations function. */
139 typedef DECLCALLBACK(int) FNLOGGETSTR(PRTLOGGER, char *, size_t);
140 /** Function pointer. */
141 typedef FNLOGGETSTR *PFNLOGGETSTR;
142 HRESULT i_logStringProps(PRTLOGGER pLogger, PFNLOGGETSTR pfnLogGetStr, const char *pszLogGetStr, Utf8Str *pstrSettings);
143
144 Console * const mParent;
145 /** @name Flags whether settings have been queued because they could not be sent
146 * to the VM (not up yet, etc.)
147 * @{ */
148 uint8_t maiQueuedEmExecPolicyParams[EMEXECPOLICY_END];
149 int mSingleStepQueued;
150 int mRecompileUserQueued;
151 int mRecompileSupervisorQueued;
152 int mPatmEnabledQueued;
153 int mCsamEnabledQueued;
154 int mLogEnabledQueued;
155 uint32_t mVirtualTimeRateQueued;
156 bool mFlushMode;
157 /** @} */
158};
159
160#endif /* !____H_MACHINEDEBUGGER */
161/* 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