VirtualBox

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

Last change on this file since 70644 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.4 KB
Line 
1/* $Id: MachineDebuggerImpl.h 69500 2017-10-28 15:14:05Z 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 getHWVirtExEnabled(BOOL *aHWVirtExEnabled);
69 HRESULT getHWVirtExNestedPagingEnabled(BOOL *aHWVirtExNestedPagingEnabled);
70 HRESULT getHWVirtExVPIDEnabled(BOOL *aHWVirtExVPIDEnabled);
71 HRESULT getHWVirtExUXEnabled(BOOL *aHWVirtExUXEnabled);
72 HRESULT getOSName(com::Utf8Str &aOSName);
73 HRESULT getOSVersion(com::Utf8Str &aOSVersion);
74 HRESULT getPAEEnabled(BOOL *aPAEEnabled);
75 HRESULT getVirtualTimeRate(ULONG *aVirtualTimeRate);
76 HRESULT setVirtualTimeRate(ULONG aVirtualTimeRate);
77 HRESULT getVM(LONG64 *aVM);
78 HRESULT getUptime(LONG64 *aUptime);
79
80 // wrapped IMachineDeugger properties
81 HRESULT dumpGuestCore(const com::Utf8Str &aFilename,
82 const com::Utf8Str &aCompression);
83 HRESULT dumpHostProcessCore(const com::Utf8Str &aFilename,
84 const com::Utf8Str &aCompression);
85 HRESULT info(const com::Utf8Str &aName,
86 const com::Utf8Str &aArgs,
87 com::Utf8Str &aInfo);
88 HRESULT injectNMI();
89 HRESULT modifyLogGroups(const com::Utf8Str &aSettings);
90 HRESULT modifyLogFlags(const com::Utf8Str &aSettings);
91 HRESULT modifyLogDestinations(const com::Utf8Str &aSettings);
92 HRESULT readPhysicalMemory(LONG64 aAddress,
93 ULONG aSize,
94 std::vector<BYTE> &aBytes);
95 HRESULT writePhysicalMemory(LONG64 aAddress,
96 ULONG aSize,
97 const std::vector<BYTE> &aBytes);
98 HRESULT readVirtualMemory(ULONG aCpuId,
99 LONG64 aAddress,
100 ULONG aSize,
101 std::vector<BYTE> &aBytes);
102 HRESULT writeVirtualMemory(ULONG aCpuId,
103 LONG64 aAddress,
104 ULONG aSize,
105 const std::vector<BYTE> &aBytes);
106 HRESULT loadPlugIn(const com::Utf8Str &aName,
107 com::Utf8Str &aPlugInName);
108 HRESULT unloadPlugIn(const com::Utf8Str &aName);
109 HRESULT detectOS(com::Utf8Str &aOs);
110 HRESULT queryOSKernelLog(ULONG aMaxMessages,
111 com::Utf8Str &aDmesg);
112 HRESULT getRegister(ULONG aCpuId,
113 const com::Utf8Str &aName,
114 com::Utf8Str &aValue);
115 HRESULT getRegisters(ULONG aCpuId,
116 std::vector<com::Utf8Str> &aNames,
117 std::vector<com::Utf8Str> &aValues);
118 HRESULT setRegister(ULONG aCpuId,
119 const com::Utf8Str &aName,
120 const com::Utf8Str &aValue);
121 HRESULT setRegisters(ULONG aCpuId,
122 const std::vector<com::Utf8Str> &aNames,
123 const std::vector<com::Utf8Str> &aValues);
124 HRESULT dumpGuestStack(ULONG aCpuId,
125 com::Utf8Str &aStack);
126 HRESULT resetStats(const com::Utf8Str &aPattern);
127 HRESULT dumpStats(const com::Utf8Str &aPattern);
128 HRESULT getStats(const com::Utf8Str &aPattern,
129 BOOL aWithDescriptions,
130 com::Utf8Str &aStats);
131
132 // private methods
133 bool i_queueSettings() const;
134 HRESULT i_getEmExecPolicyProperty(EMEXECPOLICY enmPolicy, BOOL *pfEnforced);
135 HRESULT i_setEmExecPolicyProperty(EMEXECPOLICY enmPolicy, BOOL fEnforce);
136
137 /** RTLogGetFlags, RTLogGetGroupSettings and RTLogGetDestinations function. */
138 typedef DECLCALLBACK(int) FNLOGGETSTR(PRTLOGGER, char *, size_t);
139 /** Function pointer. */
140 typedef FNLOGGETSTR *PFNLOGGETSTR;
141 HRESULT i_logStringProps(PRTLOGGER pLogger, PFNLOGGETSTR pfnLogGetStr, const char *pszLogGetStr, Utf8Str *pstrSettings);
142
143 Console * const mParent;
144 /** @name Flags whether settings have been queued because they could not be sent
145 * to the VM (not up yet, etc.)
146 * @{ */
147 uint8_t maiQueuedEmExecPolicyParams[EMEXECPOLICY_END];
148 int mSingleStepQueued;
149 int mRecompileUserQueued;
150 int mRecompileSupervisorQueued;
151 int mPatmEnabledQueued;
152 int mCsamEnabledQueued;
153 int mLogEnabledQueued;
154 uint32_t mVirtualTimeRateQueued;
155 bool mFlushMode;
156 /** @} */
157};
158
159#endif /* !____H_MACHINEDEBUGGER */
160/* 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