VirtualBox

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

Last change on this file since 39668 was 39668, checked in by vboxsync, 13 years ago

Implemented the log setting properties (read-only).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1/* $Id: MachineDebuggerImpl.h 39668 2011-12-20 21:46:30Z vboxsync $ */
2
3/** @file
4 *
5 * VirtualBox COM class implementation
6 */
7
8/*
9 * Copyright (C) 2006-2008 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.215389.xyz. 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 *aEnabled);
55 STDMETHOD(COMSETTER(Singlestep)) (BOOL aEnable);
56 STDMETHOD(COMGETTER(RecompileUser)) (BOOL *aEnabled);
57 STDMETHOD(COMSETTER(RecompileUser)) (BOOL aEnable);
58 STDMETHOD(COMGETTER(RecompileSupervisor)) (BOOL *aEnabled);
59 STDMETHOD(COMSETTER(RecompileSupervisor)) (BOOL aEnable);
60 STDMETHOD(COMGETTER(PATMEnabled)) (BOOL *aEnabled);
61 STDMETHOD(COMSETTER(PATMEnabled)) (BOOL aEnable);
62 STDMETHOD(COMGETTER(CSAMEnabled)) (BOOL *aEnabled);
63 STDMETHOD(COMSETTER(CSAMEnabled)) (BOOL aEnable);
64 STDMETHOD(COMGETTER(LogEnabled)) (BOOL *aEnabled);
65 STDMETHOD(COMSETTER(LogEnabled)) (BOOL aEnable);
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 *aEnabled);
73 STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled)) (BOOL *aEnabled);
74 STDMETHOD(COMGETTER(HWVirtExVPIDEnabled)) (BOOL *aEnabled);
75 STDMETHOD(COMGETTER(PAEEnabled)) (BOOL *aEnabled);
76 STDMETHOD(COMGETTER(OSName))(BSTR *a_pbstrName);
77 STDMETHOD(COMGETTER(OSVersion))(BSTR *a_pbstrVersion);
78 STDMETHOD(COMGETTER(VirtualTimeRate)) (ULONG *aPct);
79 STDMETHOD(COMSETTER(VirtualTimeRate)) (ULONG aPct);
80 STDMETHOD(COMGETTER(VM)) (LONG64 *aVm);
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 // flags whether settings have been queued because
120 // they could not be sent to the VM (not up yet, etc.)
121 int mSinglestepQueued;
122 int mRecompileUserQueued;
123 int mRecompileSupervisorQueued;
124 int mPatmEnabledQueued;
125 int mCsamEnabledQueued;
126 int mLogEnabledQueued;
127 uint32_t mVirtualTimeRateQueued;
128 bool mFlushMode;
129};
130
131#endif /* !____H_MACHINEDEBUGGER */
132/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette