VirtualBox

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

Last change on this file was 103464, checked in by vboxsync, 4 months ago

VBoxDbg,FE/Qt: Made it possible to configure the sub-tree filtering via the command line. bugref:10376

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 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 */
[103464]71 DECLCALLBACKMEMBER(int, pfnShowStatistics,(PDBGGUI pGui, const char *pszFilter, const char *pszExpand, const char *pszConfig));
[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.
[103464]154 * @param pszConfig Advanced filter configuration (min/max/regexp on
155 * sub-trees) and more.
[1]156 */
[103464]157DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui, const char *pszFilter, const char *pszExpand, const char *pszConfig);
[1]158
159/**
160 * Shows the default command line window.
161 *
162 * @returns VBox status code.
163 * @param pGui The instance returned by DBGGuiCreate().
164 */
165DBGDECL(int) DBGGuiShowCommandLine(PDBGGUI pGui);
166
[12884]167/**
168 * Sets the parent windows.
169 *
170 * @param pGui The instance returned by DBGGuiCreate().
171 * @param pvParent Pointer to a QWidget object.
172 *
173 * @remarks This will no affect any existing windows, so call it right after
174 * creating the thing.
175 */
176DBGDECL(void) DBGGuiSetParent(PDBGGUI pGui, void *pvParent);
177
178/**
179 * Sets the debug menu object.
180 *
181 * @param pGui The instance returned by DBGGuiCreate().
182 * @param pvMenu Pointer to a QMenu object.
183 *
184 * @remarks Call right after creation or risk losing menu item.
185 */
186DBGDECL(void) DBGGuiSetMenu(PDBGGUI pGui, void *pvMenu);
187
[1]188/** @} */
189
[20374]190RT_C_DECLS_END
[1]191
[76585]192#endif /* !VBOX_INCLUDED_dbggui_h */
[1]193
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use