VirtualBox

source: vbox/trunk/include/VBox/dbggui.h@ 95440

Last change on this file since 95440 was 93460, checked in by vboxsync, 3 years ago

Main/MachineDebugger,VBoxHeadless,VirtualBoxVM,VBoxSDL,VBoxDbg: Removed a few obsolete raw-mode attributes and changed the VM attribute into getUVMAndVMMFunctionTable, restricting it to calls from within the VM process. bugref:10074

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1/** @file
2 * DBGGUI - The VirtualBox Debugger GUI. (VBoxDbg)
3 */
4
5/*
6 * Copyright (C) 2006-2022 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef VBOX_INCLUDED_dbggui_h
27#define VBOX_INCLUDED_dbggui_h
28#ifndef RT_WITHOUT_PRAGMA_ONCE
29# pragma once
30#endif
31
32#include <VBox/types.h>
33
34
35RT_C_DECLS_BEGIN
36
37/** @defgroup grp_dbggui VirtualBox Debugger GUI
38 * @ingroup grp_dbg
39 * @{
40 */
41
42#ifdef RT_OS_WINDOWS
43struct ISession;
44#else
45class ISession;
46#endif
47
48/** Pointer to the debugger GUI instance structure. */
49typedef struct DBGGUI *PDBGGUI;
50
51/** Virtual method table for the debugger GUI. */
52typedef struct DBGGUIVT
53{
54 /** The version. (DBGGUIVT_VERSION) */
55 uint32_t u32Version;
56 /** @copydoc DBGGuiDestroy */
57 DECLCALLBACKMEMBER(int, pfnDestroy,(PDBGGUI pGui));
58 /** @copydoc DBGGuiAdjustRelativePos */
59 DECLCALLBACKMEMBER(void, pfnAdjustRelativePos,(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy));
60 /** @copydoc DBGGuiShowStatistics */
61 DECLCALLBACKMEMBER(int, pfnShowStatistics,(PDBGGUI pGui, const char *pszFilter, const char *pszExpand));
62 /** @copydoc DBGGuiShowCommandLine */
63 DECLCALLBACKMEMBER(int, pfnShowCommandLine,(PDBGGUI pGui));
64 /** @copydoc DBGGuiSetParent */
65 DECLCALLBACKMEMBER(void, pfnSetParent,(PDBGGUI pGui, void *pvParent));
66 /** @copydoc DBGGuiSetMenu */
67 DECLCALLBACKMEMBER(void, pfnSetMenu,(PDBGGUI pGui, void *pvMenu));
68 /** The end version. (DBGGUIVT_VERSION) */
69 uint32_t u32EndVersion;
70} DBGGUIVT;
71/** Pointer to the virtual method table for the debugger GUI. */
72typedef DBGGUIVT const *PCDBGGUIVT;
73/** The u32Version value.
74 * The first byte is the minor version, the 2nd byte is major version number.
75 * The high 16-bit word is a magic. */
76#define DBGGUIVT_VERSION UINT32_C(0xbead0200)
77/** Macro for determining whether two versions are compatible or not.
78 * @returns boolean result.
79 * @param uVer1 The first version number.
80 * @param uVer2 The second version number.
81 */
82#define DBGGUIVT_ARE_VERSIONS_COMPATIBLE(uVer1, uVer2) \
83 ( ((uVer1) & UINT32_C(0xffffff00)) == ((uVer2) & UINT32_C(0xffffff00)) )
84
85
86/**
87 * Creates the debugger GUI.
88 *
89 * @returns VBox status code.
90 * @param pSession The VirtualBox session.
91 * @param ppGui Where to store the pointer to the debugger instance.
92 * @param ppGuiVT Where to store the virtual method table pointer.
93 * Optional.
94 */
95DBGDECL(int) DBGGuiCreate(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
96/** @copydoc DBGGuiCreate */
97typedef DECLCALLBACKTYPE(int, FNDBGGUICREATE,(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT));
98/** Pointer to DBGGuiCreate. */
99typedef FNDBGGUICREATE *PFNDBGGUICREATE;
100
101/**
102 * Creates the debugger GUI given a VM handle.
103 *
104 * @returns VBox status code.
105 * @param pUVM The VM handle.
106 * @param pVMM The VMM function table.
107 * @param ppGui Where to store the pointer to the debugger instance.
108 * @param ppGuiVT Where to store the virtual method table pointer.
109 * Optional.
110 */
111DBGDECL(int) DBGGuiCreateForVM(PUVM pUVM, PCVMMR3VTABLE pVMM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
112/** @copydoc DBGGuiCreateForVM */
113typedef DECLCALLBACKTYPE(int, FNDBGGUICREATEFORVM,(PUVM pUVM, PCVMMR3VTABLE pVMM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT));
114/** Pointer to DBGGuiCreateForVM. */
115typedef FNDBGGUICREATEFORVM *PFNDBGGUICREATEFORVM;
116
117/**
118 * Destroys the debugger GUI.
119 *
120 * @returns VBox status code.
121 * @param pGui The instance returned by DBGGuiCreate().
122 */
123DBGDECL(int) DBGGuiDestroy(PDBGGUI pGui);
124
125/**
126 * Notifies the debugger GUI that the console window (or whatever) has changed
127 * size or position.
128 *
129 * @param pGui The instance returned by DBGGuiCreate().
130 * @param x The x-coordinate of the window the debugger is relative to.
131 * @param y The y-coordinate of the window the debugger is relative to.
132 * @param cx The width of the window the debugger is relative to.
133 * @param cy The height of the window the debugger is relative to.
134 */
135DBGDECL(void) DBGGuiAdjustRelativePos(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy);
136
137/**
138 * Shows the default statistics window.
139 *
140 * @returns VBox status code.
141 * @param pGui The instance returned by DBGGuiCreate().
142 * @param pszFilter Filter pattern.
143 * @param pszExpand Expand pattern.
144 */
145DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui, const char *pszFilter, const char *pszExpand);
146
147/**
148 * Shows the default command line window.
149 *
150 * @returns VBox status code.
151 * @param pGui The instance returned by DBGGuiCreate().
152 */
153DBGDECL(int) DBGGuiShowCommandLine(PDBGGUI pGui);
154
155/**
156 * Sets the parent windows.
157 *
158 * @param pGui The instance returned by DBGGuiCreate().
159 * @param pvParent Pointer to a QWidget object.
160 *
161 * @remarks This will no affect any existing windows, so call it right after
162 * creating the thing.
163 */
164DBGDECL(void) DBGGuiSetParent(PDBGGUI pGui, void *pvParent);
165
166/**
167 * Sets the debug menu object.
168 *
169 * @param pGui The instance returned by DBGGuiCreate().
170 * @param pvMenu Pointer to a QMenu object.
171 *
172 * @remarks Call right after creation or risk losing menu item.
173 */
174DBGDECL(void) DBGGuiSetMenu(PDBGGUI pGui, void *pvMenu);
175
176/** @} */
177
178RT_C_DECLS_END
179
180#endif /* !VBOX_INCLUDED_dbggui_h */
181
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