VirtualBox

source: vbox/trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp

Last change on this file was 102092, checked in by vboxsync, 10 months ago

VMM/DBGF,DBGC,Main: Added DBGFR3RegNmQueryEx and fixed some issues with DBGFR3RegNmQueryAll that lead to assertions in Main and empty entries in VBoxManage output. Extended the 'r' and 'rg' debugger commands to make use of the two APIs, the first by appending '.' to a register (e.g. r @cr0.) and the latter by using 'all' as the register name.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 25.9 KB
Line 
1/* $Id: tstDBGCStubs.cpp 102092 2023-11-14 23:53:15Z vboxsync $ */
2/** @file
3 * DBGC Testcase - Command Parser, VMM Stub Functions.
4 */
5
6/*
7 * Copyright (C) 2006-2023 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#include <VBox/err.h>
29#include <VBox/vmm/vmapi.h>
30#include <iprt/string.h>
31
32
33
34#include <VBox/vmm/dbgf.h>
35#include <VBox/vmm/dbgfflowtrace.h>
36VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PUVM pUVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr)
37{
38 return NULL;
39}
40
41VMMR3DECL(int) DBGFR3AddrFromSelOff(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off)
42{
43 /* bad:bad -> provke error during parsing. */
44 if (Sel == 0xbad && off == 0xbad)
45 return VERR_OUT_OF_SELECTOR_BOUNDS;
46
47 /* real mode conversion. */
48 pAddress->FlatPtr = (uint32_t)(Sel << 4) | off;
49 pAddress->fFlags |= DBGFADDRESS_FLAGS_FLAT;
50 pAddress->Sel = DBGF_SEL_FLAT;
51 pAddress->off = pAddress->FlatPtr;
52 return VINF_SUCCESS;
53}
54
55VMMR3DECL(int) DBGFR3AddrToPhys(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, PRTGCPHYS pGCPhys)
56{
57 return VERR_INTERNAL_ERROR;
58}
59
60VMMR3DECL(int) DBGFR3Attach(PUVM pUVM)
61{
62 return VERR_INTERNAL_ERROR;
63}
64
65VMMR3DECL(int) DBGFR3BpClear(PUVM pUVM, RTUINT iBp)
66{
67 return VERR_INTERNAL_ERROR;
68}
69VMMR3DECL(int) DBGFR3BpDisable(PUVM pUVM, RTUINT iBp)
70{
71 return VERR_INTERNAL_ERROR;
72}
73VMMR3DECL(int) DBGFR3BpEnable(PUVM pUVM, RTUINT iBp)
74{
75 return VERR_INTERNAL_ERROR;
76}
77VMMR3DECL(int) DBGFR3BpEnum(PUVM pUVM, PFNDBGFBPENUM pfnCallback, void *pvUser)
78{
79 return VERR_INTERNAL_ERROR;
80}
81VMMR3DECL(int) DBGFR3BpSetInt3(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
82{
83 return VERR_INTERNAL_ERROR;
84}
85VMMR3DECL(int) DBGFR3BpSetReg(PUVM pUVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable,
86 uint8_t fType, uint8_t cb, PRTUINT piBp)
87{
88 return VERR_INTERNAL_ERROR;
89}
90VMMR3DECL(int) DBGFR3BpSetREM(PUVM pUVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
91{
92 return VERR_INTERNAL_ERROR;
93}
94VMMR3DECL(int) DBGFR3QueryWaitable(PUVM pUVM)
95{
96 return VINF_SUCCESS;
97}
98VMMR3DECL(int) DBGFR3Detach(PUVM pUVM)
99{
100 return VERR_INTERNAL_ERROR;
101}
102VMMR3DECL(int) DBGFR3DisasInstrEx(PUVM pUVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
103 char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
104{
105 return VERR_INTERNAL_ERROR;
106}
107VMMR3DECL(int) DBGFR3EventWait(PUVM pUVM, RTMSINTERVAL cMillies, PDBGFEVENT pEvent)
108{
109 return VERR_INTERNAL_ERROR;
110}
111VMMR3DECL(int) DBGFR3EventConfigEx(PUVM pUVM, PCDBGFEVENTCONFIG paConfigs, size_t cConfigs)
112{
113 return VERR_INTERNAL_ERROR;
114}
115VMMR3DECL(int) DBGFR3InterruptConfigEx(PUVM pUVM, PCDBGFINTERRUPTCONFIG paConfigs, size_t cConfigs)
116{
117 return VERR_INTERNAL_ERROR;
118}
119
120VMMR3DECL(int) DBGFR3Halt(PUVM pUVM, VMCPUID idCpu)
121{
122 return VERR_INTERNAL_ERROR;
123}
124VMMR3DECL(int) DBGFR3Info(PUVM pUVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
125{
126 return VERR_INTERNAL_ERROR;
127}
128VMMR3DECL(int) DBGFR3InfoEx(PUVM pUVM, VMCPUID idCpu, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
129{
130 return VERR_INTERNAL_ERROR;
131}
132VMMR3DECL(void) DBGFR3InfoGenericGetOptError(PCDBGFINFOHLP pHlp, int rc, union RTGETOPTUNION *pValueUnion, struct RTGETOPTSTATE *pState)
133{
134}
135VMMR3DECL(bool) DBGFR3IsHalted(PUVM pUVM, VMCPUID idCpu)
136{
137 return true;
138}
139VMMR3DECL(int) DBGFR3LogModifyDestinations(PUVM pUVM, const char *pszDestSettings)
140{
141 return VERR_INTERNAL_ERROR;
142}
143VMMR3DECL(int) DBGFR3LogModifyFlags(PUVM pUVM, const char *pszFlagSettings)
144{
145 return VERR_INTERNAL_ERROR;
146}
147VMMR3DECL(int) DBGFR3LogModifyGroups(PUVM pUVM, const char *pszGroupSettings)
148{
149 return VERR_INTERNAL_ERROR;
150}
151VMMR3DECL(RTDBGCFG) DBGFR3AsGetConfig(PUVM pUVM)
152{
153 return NIL_RTDBGCFG;
154}
155VMMR3DECL(int) DBGFR3AsLoadImage(PUVM pUVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, RTLDRARCH enmArch,
156 PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags)
157{
158 return VERR_INTERNAL_ERROR;
159}
160VMMR3DECL(int) DBGFR3AsLoadMap(PUVM pUVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, RTGCUINTPTR uSubtrahend, uint32_t fFlags)
161{
162 return VERR_INTERNAL_ERROR;
163}
164VMMR3DECL(int) DBGFR3AsUnlinkModuleByName(PUVM pUVM, RTDBGAS hDbgAs, const char *pszModName)
165{
166 return VERR_INTERNAL_ERROR;
167}
168VMMR3DECL(RTDBGAS) DBGFR3AsResolveAndRetain(PUVM pUVM, RTDBGAS hAlias)
169{
170 return NIL_RTDBGAS;
171}
172VMMR3DECL(int) DBGFR3AsLineByAddr(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress,
173 PRTGCINTPTR poffDisp, PRTDBGLINE pLine, PRTDBGMOD phMod)
174{
175 return VERR_DBG_LINE_NOT_FOUND;
176}
177VMMR3DECL(int) DBGFR3Resume(PUVM pUVM, VMCPUID idCpu)
178{
179 return VERR_INTERNAL_ERROR;
180}
181VMMR3DECL(int) DBGFR3StackWalkBegin(PUVM pUVM, VMCPUID idCpu, DBGFCODETYPE enmCodeType, PCDBGFSTACKFRAME *ppFirstFrame)
182{
183 return VERR_INTERNAL_ERROR;
184}
185VMMR3DECL(PCDBGFSTACKFRAME) DBGFR3StackWalkNext(PCDBGFSTACKFRAME pCurrent)
186{
187 return NULL;
188}
189VMMR3DECL(void) DBGFR3StackWalkEnd(PCDBGFSTACKFRAME pFirstFrame)
190{
191}
192VMMR3DECL(int) DBGFR3StepEx(PUVM pUVM, VMCPUID idCpu, uint32_t fFlags, PCDBGFADDRESS pStopPcAddr,
193 PCDBGFADDRESS pStopPopAddr, RTGCUINTPTR cbStopPop, uint32_t cMaxSteps)
194{
195 return VERR_INTERNAL_ERROR;
196}
197VMMR3DECL(int) DBGFR3AsSymbolByAddr(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, uint32_t fFlags, PRTGCINTPTR poffDisplacement, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
198{
199 return VERR_INTERNAL_ERROR;
200}
201VMMR3DECL(PRTDBGSYMBOL) DBGFR3AsSymbolByAddrA(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, uint32_t fFlags,
202 PRTGCINTPTR poffDisp, PRTDBGMOD phMod)
203{
204 return NULL;
205}
206VMMR3DECL(int) DBGFR3AsSymbolByName(PUVM pUVM, RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
207{
208 return VERR_INTERNAL_ERROR;
209}
210VMMR3DECL(int) DBGFR3AsLinkModule(PUVM pUVM, RTDBGAS hDbgAs, RTDBGMOD hMod, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags)
211{
212 return VERR_INTERNAL_ERROR;
213}
214VMMR3DECL(int) DBGFR3ModInMem(PUVM pUVM, PCDBGFADDRESS pImageAddr, uint32_t fFlags, const char *pszName, const char *pszFilename,
215 RTLDRARCH enmArch, uint32_t cbImage, PRTDBGMOD phDbgMod, PRTERRINFO pErrInfo)
216{
217 return VERR_INTERNAL_ERROR;
218}
219VMMR3DECL(int) DBGFR3MemScan(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, RTGCUINTPTR uAlign, const void *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress)
220{
221 return VERR_INTERNAL_ERROR;
222}
223VMMR3DECL(int) DBGFR3MemRead(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead)
224{
225 return VERR_INTERNAL_ERROR;
226}
227VMMR3DECL(int) DBGFR3MemReadString(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cchBuf)
228{
229 return VERR_INTERNAL_ERROR;
230}
231VMMR3DECL(int) DBGFR3MemWrite(PUVM pUVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, const void *pvBuf, size_t cbRead)
232{
233 return VERR_INTERNAL_ERROR;
234}
235VMMDECL(int) DBGFR3PagingDumpEx(PUVM pUVM, VMCPUID idCpu, uint32_t fFlags, uint64_t cr3, uint64_t u64FirstAddr,
236 uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp)
237{
238 return VERR_INTERNAL_ERROR;
239}
240VMMR3DECL(int) DBGFR3RegNmValidate(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg)
241{
242 if ( !strcmp(pszReg, "ah")
243 || !strcmp(pszReg, "ax")
244 || !strcmp(pszReg, "eax")
245 || !strcmp(pszReg, "rax"))
246 return VINF_SUCCESS;
247 return VERR_DBGF_REGISTER_NOT_FOUND;
248}
249VMMR3DECL(const char *) DBGFR3RegCpuName(PUVM pUVM, DBGFREG enmReg, DBGFREGVALTYPE enmType)
250{
251 return NULL;
252}
253VMMR3DECL(int) DBGFR3RegCpuQueryU8( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8)
254{
255 return VERR_INTERNAL_ERROR;
256}
257VMMR3DECL(int) DBGFR3RegCpuQueryU16( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16)
258{
259 return VERR_INTERNAL_ERROR;
260}
261VMMR3DECL(int) DBGFR3RegCpuQueryU32( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32)
262{
263 return VERR_INTERNAL_ERROR;
264}
265VMMR3DECL(int) DBGFR3RegCpuQueryU64( PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64)
266{
267 return VERR_INTERNAL_ERROR;
268}
269VMMR3DECL(int) DBGFR3RegCpuQueryXdtr(PUVM pUVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64Base, uint16_t *pu16Limit)
270{
271 return VERR_INTERNAL_ERROR;
272}
273VMMR3DECL(int) DBGFR3RegNmQuery(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, PDBGFREGVAL pValue, PDBGFREGVALTYPE penmType)
274{
275 if (idDefCpu == 0 || idDefCpu == DBGFREG_HYPER_VMCPUID)
276 {
277 if (!strcmp(pszReg, "ah"))
278 {
279 pValue->u16 = 0xf0;
280 *penmType = DBGFREGVALTYPE_U8;
281 return VINF_SUCCESS;
282 }
283 if (!strcmp(pszReg, "ax"))
284 {
285 pValue->u16 = 0xbabe;
286 *penmType = DBGFREGVALTYPE_U16;
287 return VINF_SUCCESS;
288 }
289 if (!strcmp(pszReg, "eax"))
290 {
291 pValue->u32 = 0xcafebabe;
292 *penmType = DBGFREGVALTYPE_U32;
293 return VINF_SUCCESS;
294 }
295 if (!strcmp(pszReg, "rax"))
296 {
297 pValue->u64 = UINT64_C(0x00beef00feedface);
298 *penmType = DBGFREGVALTYPE_U32;
299 return VINF_SUCCESS;
300 }
301 }
302 return VERR_DBGF_REGISTER_NOT_FOUND;
303}
304VMMR3DECL(int) DBGFR3RegNmQueryEx(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, uint32_t fFlags,
305 PDBGFREGENTRYNM paRegs, size_t *pcRegs)
306{
307 return VERR_INTERNAL_ERROR;
308}
309VMMR3DECL(int) DBGFR3RegNmQueryAll(PUVM pUVM, PDBGFREGENTRYNM paRegs, size_t cRegs)
310{
311 return VERR_INTERNAL_ERROR;
312}
313VMMR3DECL(int) DBGFR3RegNmQueryAllCount(PUVM pUVM, size_t *pcRegs)
314{
315 *pcRegs = 99;
316 return VINF_SUCCESS;
317}
318VMMR3DECL(int) DBGFR3RegPrintf(PUVM pUVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...)
319{
320 return VERR_INTERNAL_ERROR;
321}
322VMMDECL(ssize_t) DBGFR3RegFormatValue(char *pszBuf, size_t cbBuf, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType, bool fSpecial)
323{
324 return VERR_INTERNAL_ERROR;
325}
326VMMDECL(ssize_t) DBGFR3RegFormatValueEx(char *pszBuf, size_t cbBuf, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType,
327 unsigned uBase, signed int cchWidth, signed int cchPrecision, uint32_t fFlags)
328{
329 RT_NOREF(pszBuf, cbBuf, pValue, enmType, uBase, cchWidth, cchPrecision, fFlags);
330 return VERR_INTERNAL_ERROR;
331}
332VMMR3DECL(int) DBGFR3RegNmSet(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType)
333{
334 return VERR_INTERNAL_ERROR;
335}
336
337VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PUVM pUVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr)
338{
339 return NULL;
340}
341VMMR3DECL(int) DBGFR3AddrToHostPhys(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
342{
343 return VERR_INTERNAL_ERROR;
344}
345VMMR3DECL(int) DBGFR3AddrToVolatileR3Ptr(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
346{
347 return VERR_INTERNAL_ERROR;
348}
349
350VMMR3DECL(int) DBGFR3OSRegister(PUVM pUVM, PCDBGFOSREG pReg)
351{
352 return VERR_INTERNAL_ERROR;
353}
354VMMR3DECL(int) DBGFR3OSDetect(PUVM pUVM, char *pszName, size_t cchName)
355{
356 return VERR_INTERNAL_ERROR;
357}
358VMMR3DECL(int) DBGFR3OSQueryNameAndVersion(PUVM pUVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion)
359{
360 return VERR_INTERNAL_ERROR;
361}
362VMMR3DECL(void *) DBGFR3OSQueryInterface(PUVM pUVM, DBGFOSINTERFACE enmIf)
363{
364 return NULL;
365}
366
367VMMR3DECL(int) DBGFR3SelQueryInfo(PUVM pUVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo)
368{
369 return VERR_INTERNAL_ERROR;
370}
371
372VMMR3DECL(CPUMMODE) DBGFR3CpuGetMode(PUVM pUVM, VMCPUID idCpu)
373{
374 return CPUMMODE_INVALID;
375}
376VMMR3DECL(VMCPUID) DBGFR3CpuGetCount(PUVM pUVM)
377{
378 return 1;
379}
380VMMR3DECL(bool) DBGFR3CpuIsIn64BitCode(PUVM pUVM, VMCPUID idCpu)
381{
382 return false;
383}
384VMMR3DECL(bool) DBGFR3CpuIsInV86Code(PUVM pUVM, VMCPUID idCpu)
385{
386 return false;
387}
388
389VMMR3DECL(int) DBGFR3CoreWrite(PUVM pUVM, const char *pszFilename, bool fReplaceFile)
390{
391 return VERR_INTERNAL_ERROR;
392}
393
394VMMR3DECL(int) DBGFR3PlugInLoad(PUVM pUVM, const char *pszPlugIn, char *pszActual, size_t cbActual, PRTERRINFO pErrInfo)
395{
396 return VERR_INTERNAL_ERROR;
397}
398VMMR3DECL(int) DBGFR3PlugInUnload(PUVM pUVM, const char *pszName)
399{
400 return VERR_INTERNAL_ERROR;
401}
402VMMR3DECL(void) DBGFR3PlugInLoadAll(PUVM pUVM)
403{
404}
405VMMR3DECL(int) DBGFR3TypeRegister( PUVM pUVM, uint32_t cTypes, PCDBGFTYPEREG paTypes)
406{
407 return VERR_INTERNAL_ERROR;
408}
409VMMR3DECL(int) DBGFR3TypeDeregister(PUVM pUVM, const char *pszType)
410{
411 return VERR_INTERNAL_ERROR;
412}
413VMMR3DECL(int) DBGFR3TypeQueryReg( PUVM pUVM, const char *pszType, PCDBGFTYPEREG *ppTypeReg)
414{
415 return VERR_INTERNAL_ERROR;
416}
417VMMR3DECL(int) DBGFR3TypeQuerySize( PUVM pUVM, const char *pszType, size_t *pcbType)
418{
419 return VERR_INTERNAL_ERROR;
420}
421VMMR3DECL(int) DBGFR3TypeSetSize( PUVM pUVM, const char *pszType, size_t cbType)
422{
423 return VERR_INTERNAL_ERROR;
424}
425VMMR3DECL(int) DBGFR3TypeDumpEx( PUVM pUVM, const char *pszType, uint32_t fFlags,
426 uint32_t cLvlMax, PFNDBGFR3TYPEDUMP pfnDump, void *pvUser)
427{
428 return VERR_INTERNAL_ERROR;
429}
430VMMR3DECL(int) DBGFR3TypeQueryValByType(PUVM pUVM, PCDBGFADDRESS pAddress, const char *pszType,
431 PDBGFTYPEVAL *ppVal)
432{
433 return VERR_INTERNAL_ERROR;
434}
435VMMR3DECL(void) DBGFR3TypeValFree(PDBGFTYPEVAL pVal)
436{
437}
438VMMR3DECL(int) DBGFR3TypeValDumpEx(PUVM pUVM, PCDBGFADDRESS pAddress, const char *pszType, uint32_t fFlags,
439 uint32_t cLvlMax, FNDBGFR3TYPEVALDUMP pfnDump, void *pvUser)
440{
441 return VERR_INTERNAL_ERROR;
442}
443
444VMMR3DECL(int) DBGFR3FlowCreate(PUVM pUVM, VMCPUID idCpu, PDBGFADDRESS pAddressStart, uint32_t cbDisasmMax,
445 uint32_t fFlagsFlow, uint32_t fFlagsDisasm, PDBGFFLOW phFlow)
446{
447 return VERR_INTERNAL_ERROR;
448}
449VMMR3DECL(uint32_t) DBGFR3FlowRetain(DBGFFLOW hFlow)
450{
451 return 0;
452}
453VMMR3DECL(uint32_t) DBGFR3FlowRelease(DBGFFLOW hFlow)
454{
455 return 0;
456}
457VMMR3DECL(int) DBGFR3FlowQueryStartBb(DBGFFLOW hFlow, PDBGFFLOWBB phFlowBb)
458{
459 return VERR_INTERNAL_ERROR;
460}
461VMMR3DECL(int) DBGFR3FlowQueryBbByAddress(DBGFFLOW hFlow, PDBGFADDRESS pAddr, PDBGFFLOWBB phFlowBb)
462{
463 return VERR_INTERNAL_ERROR;
464}
465VMMR3DECL(int) DBGFR3FlowQueryBranchTblByAddress(DBGFFLOW hFlow, PDBGFADDRESS pAddr, PDBGFFLOWBRANCHTBL phFlowBranchTbl)
466{
467 return VERR_INTERNAL_ERROR;
468}
469VMMR3DECL(uint32_t) DBGFR3FlowGetBbCount(DBGFFLOW hFlow)
470{
471 return 0;
472}
473VMMR3DECL(uint32_t) DBGFR3FlowGetBranchTblCount(DBGFFLOW hFlow)
474{
475 return 0;
476}
477VMMR3DECL(uint32_t) DBGFR3FlowBbRetain(DBGFFLOWBB hFlowBb)
478{
479 return 0;
480}
481VMMR3DECL(uint32_t) DBGFR3FlowBbRelease(DBGFFLOWBB hFlowBb)
482{
483 return 0;
484}
485VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetStartAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrStart)
486{
487 return NULL;
488}
489VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetEndAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrEnd)
490{
491 return NULL;
492}
493VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetBranchAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrTarget)
494{
495 return NULL;
496}
497VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetFollowingAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrFollow)
498{
499 return NULL;
500}
501VMMR3DECL(DBGFFLOWBBENDTYPE) DBGFR3FlowBbGetType(DBGFFLOWBB hFlowBb)
502{
503 return DBGFFLOWBBENDTYPE_INVALID;
504}
505VMMR3DECL(uint32_t) DBGFR3FlowBbGetInstrCount(DBGFFLOWBB hFlowBb)
506{
507 return 0;
508}
509VMMR3DECL(uint32_t) DBGFR3FlowBbGetFlags(DBGFFLOWBB hFlowBb)
510{
511 return 0;
512}
513VMMR3DECL(int) DBGFR3FlowBbQueryBranchTbl(DBGFFLOWBB hFlowBb, PDBGFFLOWBRANCHTBL phBranchTbl)
514{
515 return VERR_INTERNAL_ERROR;
516}
517VMMR3DECL(int) DBGFR3FlowBbQueryError(DBGFFLOWBB hFlowBb, const char **ppszErr)
518{
519 return VERR_INTERNAL_ERROR;
520}
521VMMR3DECL(int) DBGFR3FlowBbQueryInstr(DBGFFLOWBB hFlowBb, uint32_t idxInstr, PDBGFADDRESS pAddrInstr,
522 uint32_t *pcbInstr, const char **ppszInstr)
523{
524 return VERR_INTERNAL_ERROR;
525}
526VMMR3DECL(int) DBGFR3FlowBbQuerySuccessors(DBGFFLOWBB hFlowBb, PDBGFFLOWBB phFlowBbFollow,
527 PDBGFFLOWBB phFlowBbTarget)
528{
529 return VERR_INTERNAL_ERROR;
530}
531VMMR3DECL(uint32_t) DBGFR3FlowBbGetRefBbCount(DBGFFLOWBB hFlowBb)
532{
533 return 0;
534}
535VMMR3DECL(int) DBGFR3FlowBbGetRefBb(DBGFFLOWBB hFlowBb, PDBGFFLOWBB pahFlowBbRef, uint32_t cRef)
536{
537 return VERR_INTERNAL_ERROR;
538}
539VMMR3DECL(uint32_t) DBGFR3FlowBranchTblRetain(DBGFFLOWBRANCHTBL hFlowBranchTbl)
540{
541 return 0;
542}
543VMMR3DECL(uint32_t) DBGFR3FlowBranchTblRelease(DBGFFLOWBRANCHTBL hFlowBranchTbl)
544{
545 return 0;
546}
547VMMR3DECL(uint32_t) DBGFR3FlowBranchTblGetSlots(DBGFFLOWBRANCHTBL hFlowBranchTbl)
548{
549 return 0;
550}
551VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBranchTblGetStartAddress(DBGFFLOWBRANCHTBL hFlowBranchTbl, PDBGFADDRESS pAddrStart)
552{
553 return NULL;
554}
555VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBranchTblGetAddrAtSlot(DBGFFLOWBRANCHTBL hFlowBranchTbl, uint32_t idxSlot, PDBGFADDRESS pAddrSlot)
556{
557 return NULL;
558}
559VMMR3DECL(int) DBGFR3FlowBranchTblQueryAddresses(DBGFFLOWBRANCHTBL hFlowBranchTbl, PDBGFADDRESS paAddrs, uint32_t cAddrs)
560{
561 return VERR_INTERNAL_ERROR;
562}
563VMMR3DECL(int) DBGFR3FlowItCreate(DBGFFLOW hFlow, DBGFFLOWITORDER enmOrder, PDBGFFLOWIT phFlowIt)
564{
565 return VERR_INTERNAL_ERROR;
566}
567VMMR3DECL(void) DBGFR3FlowItDestroy(DBGFFLOWIT hFlowIt)
568{
569}
570VMMR3DECL(DBGFFLOWBB) DBGFR3FlowItNext(DBGFFLOWIT hFlowIt)
571{
572 return NULL;
573}
574VMMR3DECL(int) DBGFR3FlowItReset(DBGFFLOWIT hFlowIt)
575{
576 return VERR_INTERNAL_ERROR;
577}
578VMMR3DECL(int) DBGFR3FlowBranchTblItCreate(DBGFFLOW hFlow, DBGFFLOWITORDER enmOrder, PDBGFFLOWBRANCHTBLIT phFlowBranchTblIt)
579{
580 return VERR_INTERNAL_ERROR;
581}
582VMMR3DECL(void) DBGFR3FlowBranchTblItDestroy(DBGFFLOWBRANCHTBLIT hFlowBranchTblIt)
583{
584}
585VMMR3DECL(DBGFFLOWBRANCHTBL) DBGFR3FlowBranchTblItNext(DBGFFLOWBRANCHTBLIT hFlowBranchTblIt)
586{
587 return NULL;
588}
589VMMR3DECL(int) DBGFR3FlowBranchTblItReset(DBGFFLOWBRANCHTBLIT hFlowBranchTblIt)
590{
591 return VERR_INTERNAL_ERROR;
592}
593VMMR3DECL(int) DBGFR3FlowTraceModCreateFromFlowGraph(PUVM pUVM, VMCPUID idCpu, DBGFFLOW hFlow,
594 DBGFFLOWTRACEPROBE hFlowTraceProbeCommon,
595 DBGFFLOWTRACEPROBE hFlowTraceProbeEntry,
596 DBGFFLOWTRACEPROBE hFlowTraceProbeRegular,
597 DBGFFLOWTRACEPROBE hFlowTraceProbeExit,
598 PDBGFFLOWTRACEMOD phFlowTraceMod)
599{
600 return VERR_INTERNAL_ERROR;
601}
602VMMR3DECL(uint32_t) DBGFR3FlowTraceModRetain(DBGFFLOWTRACEMOD hFlowTraceMod)
603{
604 return 0;
605}
606VMMR3DECL(uint32_t) DBGFR3FlowTraceModRelease(DBGFFLOWTRACEMOD hFlowTraceMod)
607{
608 return 0;
609}
610VMMR3DECL(int) DBGFR3FlowTraceModEnable(DBGFFLOWTRACEMOD hFlowTraceMod, uint32_t cHits, uint32_t cRecordsMax)
611{
612 return VERR_INTERNAL_ERROR;
613}
614VMMR3DECL(int) DBGFR3FlowTraceModDisable(DBGFFLOWTRACEMOD hFlowTraceMod)
615{
616 return VERR_INTERNAL_ERROR;
617}
618VMMR3DECL(int) DBGFR3FlowTraceModQueryReport(DBGFFLOWTRACEMOD hFlowTraceMod,
619 PDBGFFLOWTRACEREPORT phFlowTraceReport)
620{
621 return VERR_INTERNAL_ERROR;
622}
623VMMR3DECL(int) DBGFR3FlowTraceModClear(DBGFFLOWTRACEMOD hFlowTraceMod)
624{
625 return VERR_INTERNAL_ERROR;
626}
627VMMR3DECL(int) DBGFR3FlowTraceModAddProbe(DBGFFLOWTRACEMOD hFlowTraceMod, PCDBGFADDRESS pAddrProbe,
628 DBGFFLOWTRACEPROBE hFlowTraceProbe, uint32_t fFlags)
629{
630 return VERR_INTERNAL_ERROR;
631}
632VMMR3DECL(int) DBGFR3FlowTraceProbeCreate(PUVM pUVM, const char *pszDescr, PDBGFFLOWTRACEPROBE phFlowTraceProbe)
633{
634 return VERR_INTERNAL_ERROR;
635}
636VMMR3DECL(uint32_t) DBGFR3FlowTraceProbeRetain(DBGFFLOWTRACEPROBE hFlowTraceProbe)
637{
638 return 0;
639}
640VMMR3DECL(uint32_t) DBGFR3FlowTraceProbeRelease(DBGFFLOWTRACEPROBE hFlowTraceProbe)
641{
642 return 0;
643}
644VMMR3DECL(int) DBGFR3FlowTraceProbeEntriesAdd(DBGFFLOWTRACEPROBE hFlowTraceProbe,
645 PCDBGFFLOWTRACEPROBEENTRY paEntries, uint32_t cEntries)
646{
647 return VERR_INTERNAL_ERROR;
648}
649VMMR3DECL(uint32_t) DBGFR3FlowTraceReportRetain(DBGFFLOWTRACEREPORT hFlowTraceReport)
650{
651 return 0;
652}
653VMMR3DECL(uint32_t) DBGFR3FlowTraceReportRelease(DBGFFLOWTRACEREPORT hFlowTraceReport)
654{
655 return 0;
656}
657VMMR3DECL(uint32_t) DBGFR3FlowTraceReportGetRecordCount(DBGFFLOWTRACEREPORT hFlowTraceReport)
658{
659 return 0;
660}
661VMMR3DECL(int) DBGFR3FlowTraceReportQueryRecord(DBGFFLOWTRACEREPORT hFlowTraceReport, uint32_t idxRec, PDBGFFLOWTRACERECORD phFlowTraceRec)
662{
663 return VERR_INTERNAL_ERROR;
664}
665VMMR3DECL(int) DBGFR3FlowTraceReportQueryFiltered(DBGFFLOWTRACEREPORT hFlowTraceReport, uint32_t fFlags,
666 PDBGFFLOWTRACEREPORTFILTER paFilters, uint32_t cFilters,
667 DBGFFLOWTRACEREPORTFILTEROP enmOp,
668 PDBGFFLOWTRACEREPORT phFlowTraceReportFiltered)
669{
670 return VERR_INTERNAL_ERROR;
671}
672VMMR3DECL(int) DBGFR3FlowTraceReportEnumRecords(DBGFFLOWTRACEREPORT hFlowTraceReport,
673 PFNDBGFFLOWTRACEREPORTENUMCLBK pfnEnum,
674 void *pvUser)
675{
676 return VERR_INTERNAL_ERROR;
677}
678VMMR3DECL(uint32_t) DBGFR3FlowTraceRecordRetain(DBGFFLOWTRACERECORD hFlowTraceRecord)
679{
680 return 0;
681}
682VMMR3DECL(uint32_t) DBGFR3FlowTraceRecordRelease(DBGFFLOWTRACERECORD hFlowTraceRecord)
683{
684 return 0;
685}
686VMMR3DECL(uint64_t) DBGFR3FlowTraceRecordGetSeqNo(DBGFFLOWTRACERECORD hFlowTraceRecord)
687{
688 return 0;
689}
690VMMR3DECL(uint64_t) DBGFR3FlowTraceRecordGetTimestamp(DBGFFLOWTRACERECORD hFlowTraceRecord)
691{
692 return 0;
693}
694VMMR3DECL(PDBGFADDRESS) DBGFR3FlowTraceRecordGetAddr(DBGFFLOWTRACERECORD hFlowTraceRecord, PDBGFADDRESS pAddr)
695{
696 return NULL;
697}
698VMMR3DECL(DBGFFLOWTRACEPROBE) DBGFR3FlowTraceRecordGetProbe(DBGFFLOWTRACERECORD hFlowTraceRecord)
699{
700 return NULL;
701}
702VMMR3DECL(uint32_t) DBGFR3FlowTraceRecordGetValCount(DBGFFLOWTRACERECORD hFlowTraceRecord)
703{
704 return 0;
705}
706VMMR3DECL(PCDBGFFLOWTRACEPROBEVAL) DBGFR3FlowTraceRecordGetVals(DBGFFLOWTRACERECORD hFlowTraceRecord)
707{
708 return NULL;
709}
710VMMR3DECL(PCDBGFFLOWTRACEPROBEVAL) DBGFR3FlowTraceRecordGetValsCommon(DBGFFLOWTRACERECORD hFlowTraceRecord)
711{
712 return NULL;
713}
714VMMR3DECL(VMCPUID) DBGFR3FlowTraceRecordGetCpuId(DBGFFLOWTRACERECORD hFlowTraceRecord)
715{
716 return 0;
717}
718
719VMMR3DECL(int) DBGFR3FormatBugCheck(PUVM pUVM, char *pszDetails, size_t cbDetails,
720 uint64_t uP0, uint64_t uP1, uint64_t uP2, uint64_t uP3, uint64_t uP4)
721{
722 pszDetails[0] = '\0';
723 return VERR_INTERNAL_ERROR;
724}
725
726VMMR3DECL(PDBGFADDRESS) DBGFR3AddrAdd(PDBGFADDRESS pAddress, RTGCUINTPTR uAddend)
727{
728 RT_NOREF(uAddend);
729 return pAddress;
730}
731
732#include <VBox/vmm/cfgm.h>
733VMMR3DECL(int) CFGMR3ValidateConfig(PCFGMNODE pNode, const char *pszNode,
734 const char *pszValidValues, const char *pszValidNodes,
735 const char *pszWho, uint32_t uInstance)
736{
737 return VINF_SUCCESS;
738}
739
740VMMR3DECL(PCFGMNODE) CFGMR3GetRootU(PUVM pUVM)
741{
742 return NULL;
743}
744
745VMMR3DECL(PCFGMNODE) CFGMR3GetChild(PCFGMNODE pNode, const char *pszPath)
746{
747 return NULL;
748}
749
750VMMR3DECL(int) CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
751{
752 *pszString = '\0';
753 return VINF_SUCCESS;
754}
755
756VMMR3DECL(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
757{
758 *pszString = '\0';
759 return VINF_SUCCESS;
760}
761
762
763
764//////////////////////////////////////////////////////////////////////////
765// The rest should eventually be replaced by DBGF calls and eliminated. //
766/////////////////////////////////////////////////////////////////////////
767
768
769#include <VBox/vmm/cpum.h>
770
771VMMDECL(uint64_t) CPUMGetGuestCR3(PCVMCPU pVCpu)
772{
773 return 0;
774}
775
776VMMDECL(uint64_t) CPUMGetGuestCR4(PCVMCPU pVCpu)
777{
778 return 0;
779}
780
781VMMDECL(RTSEL) CPUMGetGuestCS(PCVMCPU pVCpu)
782{
783 return 0;
784}
785
786VMMDECL(uint32_t) CPUMGetGuestEIP(PCVMCPU pVCpu)
787{
788 return 0;
789}
790
791VMMDECL(uint64_t) CPUMGetGuestRIP(PCVMCPU pVCpu)
792{
793 return 0;
794}
795
796VMMDECL(RTGCPTR) CPUMGetGuestIDTR(PCVMCPU pVCpu, uint16_t *pcbLimit)
797{
798 return 0;
799}
800
801VMMDECL(CPUMMODE) CPUMGetGuestMode(PVMCPU pVCpu)
802{
803 return CPUMMODE_INVALID;
804}
805
806VMMDECL(PCPUMCTX) CPUMQueryGuestCtxPtr(PVMCPU pVCpu)
807{
808 return NULL;
809}
810
811VMMDECL(bool) CPUMIsGuestIn64BitCode(PCVMCPU pVCpu)
812{
813 return false;
814}
815
816VMMDECL(uint32_t) CPUMGetGuestEFlags(PCVMCPU pVCpu)
817{
818 return 2;
819}
820
821#include <VBox/vmm/hm.h>
822VMMR3DECL(bool) HMR3IsEnabled(PUVM pUVM)
823{
824 return true;
825}
826
827
828#include <VBox/vmm/nem.h>
829VMMR3DECL(bool) NEMR3IsEnabled(PUVM pUVM)
830{
831 return true;
832}
833
834
835#include <VBox/vmm/pgm.h>
836
837VMMDECL(RTHCPHYS) PGMGetHyperCR3(PVMCPU pVCpu)
838{
839 return 0;
840}
841
842VMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu)
843{
844 return PGMMODE_INVALID;
845}
846
847VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
848{
849 return VERR_INTERNAL_ERROR;
850}
851
852VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PUVM pUVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
853{
854 return VERR_INTERNAL_ERROR;
855}
856VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PUVM pUVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
857{
858 return VERR_INTERNAL_ERROR;
859}
860
861
862#include <VBox/vmm/vmm.h>
863
864VMMR3DECL(PVMCPU) VMMR3GetCpuByIdU(PUVM pUVM, RTCPUID idCpu)
865{
866 return NULL;
867}
868
869VMMR3DECL(PCVMMR3VTABLE) VMMR3GetVTable(void)
870{
871 return NULL;
872}
873
874VMMR3DECL(PVM) VMR3GetVM(PUVM pUVM)
875{
876 return NULL;
877}
878
879VMMR3DECL(VMSTATE) VMR3GetStateU(PUVM pUVM)
880{
881 return VMSTATE_DESTROYING;
882}
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