VirtualBox

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

Last change on this file since 104384 was 103464, checked in by vboxsync, 9 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
Line 
1/** @file
2 * DBGGUI - The VirtualBox Debugger GUI. (VBoxDbg)
3 */
4
5/*
6 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
10 *
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 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
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
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.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef VBOX_INCLUDED_dbggui_h
37#define VBOX_INCLUDED_dbggui_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <VBox/types.h>
43
44
45RT_C_DECLS_BEGIN
46
47/** @defgroup grp_dbggui VirtualBox Debugger GUI
48 * @ingroup grp_dbg
49 * @{
50 */
51
52#ifdef RT_OS_WINDOWS
53struct ISession;
54#else
55class ISession;
56#endif
57
58/** Pointer to the debugger GUI instance structure. */
59typedef struct DBGGUI *PDBGGUI;
60
61/** Virtual method table for the debugger GUI. */
62typedef struct DBGGUIVT
63{
64 /** The version. (DBGGUIVT_VERSION) */
65 uint32_t u32Version;
66 /** @copydoc DBGGuiDestroy */
67 DECLCALLBACKMEMBER(int, pfnDestroy,(PDBGGUI pGui));
68 /** @copydoc DBGGuiAdjustRelativePos */
69 DECLCALLBACKMEMBER(void, pfnAdjustRelativePos,(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy));
70 /** @copydoc DBGGuiShowStatistics */
71 DECLCALLBACKMEMBER(int, pfnShowStatistics,(PDBGGUI pGui, const char *pszFilter, const char *pszExpand, const char *pszConfig));
72 /** @copydoc DBGGuiShowCommandLine */
73 DECLCALLBACKMEMBER(int, pfnShowCommandLine,(PDBGGUI pGui));
74 /** @copydoc DBGGuiSetParent */
75 DECLCALLBACKMEMBER(void, pfnSetParent,(PDBGGUI pGui, void *pvParent));
76 /** @copydoc DBGGuiSetMenu */
77 DECLCALLBACKMEMBER(void, pfnSetMenu,(PDBGGUI pGui, void *pvMenu));
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. */
86#define DBGGUIVT_VERSION UINT32_C(0xbead0200)
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)) )
94
95
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.
102 * @param ppGuiVT Where to store the virtual method table pointer.
103 * Optional.
104 */
105DBGDECL(int) DBGGuiCreate(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
106/** @copydoc DBGGuiCreate */
107typedef DECLCALLBACKTYPE(int, FNDBGGUICREATE,(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT));
108/** Pointer to DBGGuiCreate. */
109typedef FNDBGGUICREATE *PFNDBGGUICREATE;
110
111/**
112 * Creates the debugger GUI given a VM handle.
113 *
114 * @returns VBox status code.
115 * @param pUVM The VM handle.
116 * @param pVMM The VMM function table.
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 */
121DBGDECL(int) DBGGuiCreateForVM(PUVM pUVM, PCVMMR3VTABLE pVMM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
122/** @copydoc DBGGuiCreateForVM */
123typedef DECLCALLBACKTYPE(int, FNDBGGUICREATEFORVM,(PUVM pUVM, PCVMMR3VTABLE pVMM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT));
124/** Pointer to DBGGuiCreateForVM. */
125typedef FNDBGGUICREATEFORVM *PFNDBGGUICREATEFORVM;
126
127/**
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().
152 * @param pszFilter Filter pattern.
153 * @param pszExpand Expand pattern.
154 * @param pszConfig Advanced filter configuration (min/max/regexp on
155 * sub-trees) and more.
156 */
157DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui, const char *pszFilter, const char *pszExpand, const char *pszConfig);
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
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
188/** @} */
189
190RT_C_DECLS_END
191
192#endif /* !VBOX_INCLUDED_dbggui_h */
193
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