VirtualBox

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

Last change on this file since 98103 was 98103, checked in by vboxsync, 22 months ago

Copyright year updates by scm.

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