VirtualBox

source: vbox/trunk/src/VBox/Debugger/DBGCIoProvInternal.h@ 97378

Last change on this file since 97378 was 96865, checked in by vboxsync, 2 years ago

Debugger: Some changes floating around, added a UDP I/O provider to be used for GDB and the WinDbg/Kd backend, bugref:1098

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: DBGCIoProvInternal.h 96865 2022-09-26 14:45:32Z vboxsync $ */
2/** @file
3 * DBGC - Debugger Console, Internal I/O provider header file.
4 */
5
6/*
7 * Copyright (C) 2020-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef DEBUGGER_INCLUDED_SRC_DBGCIoProvInternal_h
29#define DEBUGGER_INCLUDED_SRC_DBGCIoProvInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34
35/*******************************************************************************
36* Header Files *
37*******************************************************************************/
38#include <VBox/dbg.h>
39#include <VBox/err.h>
40#include <VBox/vmm/cfgm.h>
41
42
43/*******************************************************************************
44* Structures and Typedefs *
45*******************************************************************************/
46
47/** An Opaque I/O provider handle. */
48typedef struct DBGCIOPROVINT *DBGCIOPROV;
49/** Pointer to an opaque I/O provider handle. */
50typedef DBGCIOPROV *PDBGCIOPROV;
51
52
53/**
54 * I/O provider registration record.
55 */
56typedef struct DBGCIOPROVREG
57{
58 /** Unique name for the I/O provider. */
59 const char *pszName;
60 /** I/O provider description. */
61 const char *pszDesc;
62
63 /**
64 * Creates an I/O provider instance from the given config.
65 *
66 * @returns VBox status code.
67 * @param phDbgcIoProv Where to store the handle to the I/O provider instance on success.
68 * @param pCfg The config to use.
69 */
70 DECLCALLBACKMEMBER(int, pfnCreate, (PDBGCIOPROV phDbgcIoProv, PCFGMNODE pCfg));
71
72 /**
73 * Destroys the given I/O provider instance.
74 *
75 * @returns nothing.
76 * @param hDbgcIoProv The I/O provider instance handle to destroy.
77 */
78 DECLCALLBACKMEMBER(void, pfnDestroy, (DBGCIOPROV hDbgcIoProv));
79
80 /**
81 * Waits for someone to connect to the provider instance.
82 *
83 * @returns VBox status code.
84 * @retval VERR_TIMEOUT if the waiting time was exceeded without anyone connecting.
85 * @retval VERR_INTERRUPTED if the waiting was interrupted by DBGCIOPROVREG::pfnWaitInterrupt.
86 * @param hDbgcIoProv The I/O provider instance handle.
87 * @param cMsTimeout Number of milliseconds to wait, use RT_INDEFINITE_WAIT to wait indefinitely.
88 * @param ppDbgcIo Where to return the I/O connection callback table upon a succesful return.
89 */
90 DECLCALLBACKMEMBER(int, pfnWaitForConnect, (DBGCIOPROV hDbgcIoProv, RTMSINTERVAL cMsTimeout, PCDBGCIO *ppDbgcIo));
91
92 /**
93 * Interrupts the thread waiting in DBGCIOPROVREG::pfnWaitForConnect.
94 *
95 * @returns VBox status code.
96 * @param hDbgcIoProv The I/O provider instance handle.
97 */
98 DECLCALLBACKMEMBER(int, pfnWaitInterrupt, (DBGCIOPROV hDbgcIoProv));
99
100} DBGCIOPROVREG;
101/** Pointer to an I/O provider registration record. */
102typedef DBGCIOPROVREG *PDBGCIOPROVREG;
103/** Pointer toa const I/O provider registration record. */
104typedef const DBGCIOPROVREG *PCDBGCIOPROVREG;
105
106
107/*******************************************************************************
108* Global Variables *
109*******************************************************************************/
110extern const DBGCIOPROVREG g_DbgcIoProvTcp;
111extern const DBGCIOPROVREG g_DbgcIoProvUdp;
112extern const DBGCIOPROVREG g_DbgcIoProvIpc;
113
114
115#endif /* !DEBUGGER_INCLUDED_SRC_DBGCIoProvInternal_h */
116
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