VirtualBox

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

Last change on this file since 35625 was 35625, checked in by vboxsync, 14 years ago

DBGF,CPUM,DBGC: Use DBGFReg in the debugger, stop accessing CPUMCTX structures directly when messing with registers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.1 KB
Line 
1/* $Id: tstDBGCStubs.cpp 35625 2011-01-19 11:17:34Z vboxsync $ */
2/** @file
3 * DBGC Testcase - Command Parser, VMM Stub Functions.
4 */
5
6/*
7 * Copyright (C) 2006-2010 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#include <VBox/err.h>
19#include <VBox/vmm/vm.h>
20
21
22
23#include <VBox/vmm/dbgf.h>
24VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr)
25{
26 return NULL;
27}
28
29VMMR3DECL(int) DBGFR3AddrFromSelOff(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off)
30{
31 return VERR_INTERNAL_ERROR;
32}
33
34VMMR3DECL(int) DBGFR3AddrToPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys)
35{
36 return VERR_INTERNAL_ERROR;
37}
38
39VMMR3DECL(int) DBGFR3AddrToHostPhys(PVMCPU pVCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
40{
41 return VERR_INTERNAL_ERROR;
42}
43
44VMMR3DECL(int) DBGFR3AddrToVolatileR3Ptr(PVMCPU pVCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
45{
46 return VERR_INTERNAL_ERROR;
47}
48
49VMMR3DECL(int) DBGFR3Attach(PVM pVM)
50{
51 return VERR_INTERNAL_ERROR;
52}
53
54VMMR3DECL(int) DBGFR3BpClear(PVM pVM, RTUINT iBp)
55{
56 return VERR_INTERNAL_ERROR;
57}
58VMMR3DECL(int) DBGFR3BpDisable(PVM pVM, RTUINT iBp)
59{
60 return VERR_INTERNAL_ERROR;
61}
62VMMR3DECL(int) DBGFR3BpEnable(PVM pVM, RTUINT iBp)
63{
64 return VERR_INTERNAL_ERROR;
65}
66VMMR3DECL(int) DBGFR3BpEnum(PVM pVM, PFNDBGFBPENUM pfnCallback, void *pvUser)
67{
68 return VERR_INTERNAL_ERROR;
69}
70VMMR3DECL(int) DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
71{
72 return VERR_INTERNAL_ERROR;
73}
74VMMR3DECL(int) DBGFR3BpSetReg(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable,
75 uint8_t fType, uint8_t cb, PRTUINT piBp)
76{
77 return VERR_INTERNAL_ERROR;
78}
79VMMR3DECL(int) DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
80{
81 return VERR_INTERNAL_ERROR;
82}
83VMMR3DECL(bool) DBGFR3CanWait(PVM pVM)
84{
85 return true;
86}
87VMMR3DECL(int) DBGFR3Detach(PVM pVM)
88{
89 return VERR_INTERNAL_ERROR;
90}
91VMMR3DECL(int) DBGFR3DisasInstrEx(PVM pVM, VMCPUID idCpu, RTSEL Sel, RTGCPTR GCPtr, uint32_t fFlags,
92 char *pszOutput, uint32_t cchOutput, uint32_t *pcbInstr)
93{
94 return VERR_INTERNAL_ERROR;
95}
96VMMR3DECL(int) DBGFR3EventWait(PVM pVM, RTMSINTERVAL cMillies, PCDBGFEVENT *ppEvent)
97{
98 return VERR_INTERNAL_ERROR;
99}
100VMMR3DECL(int) DBGFR3Halt(PVM pVM)
101{
102 return VERR_INTERNAL_ERROR;
103}
104VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
105{
106 return VERR_INTERNAL_ERROR;
107}
108VMMR3DECL(bool) DBGFR3IsHalted(PVM pVM)
109{
110 return true;
111}
112VMMR3DECL(int) DBGFR3LineByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine)
113{
114 return VERR_INTERNAL_ERROR;
115}
116VMMR3DECL(int) DBGFR3LogModifyDestinations(PVM pVM, const char *pszDestSettings)
117{
118 return VERR_INTERNAL_ERROR;
119}
120VMMR3DECL(int) DBGFR3LogModifyFlags(PVM pVM, const char *pszFlagSettings)
121{
122 return VERR_INTERNAL_ERROR;
123}
124VMMR3DECL(int) DBGFR3LogModifyGroups(PVM pVM, const char *pszGroupSettings)
125{
126 return VERR_INTERNAL_ERROR;
127}
128VMMR3DECL(int) DBGFR3ModuleLoad(PVM pVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage)
129{
130 return VERR_INTERNAL_ERROR;
131}
132VMMR3DECL(int) DBGFR3AsLoadImage(PVM pVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, uint32_t fFlags)
133{
134 return VERR_INTERNAL_ERROR;
135}
136VMMR3DECL(int) DBGFR3AsLoadMap(PVM pVM, RTDBGAS hAS, const char *pszFilename, const char *pszModName, PCDBGFADDRESS pModAddress, RTDBGSEGIDX iModSeg, RTGCUINTPTR uSubtrahend, uint32_t fFlags)
137{
138 return VERR_INTERNAL_ERROR;
139}
140VMMR3DECL(RTDBGAS) DBGFR3AsResolveAndRetain(PVM pVM, RTDBGAS hAlias)
141{
142 return NIL_RTDBGAS;
143}
144VMMR3DECL(int) DBGFR3Resume(PVM pVM)
145{
146 return VERR_INTERNAL_ERROR;
147}
148VMMR3DECL(int) DBGFR3StackWalkBegin(PVM pVM, VMCPUID idCpu, DBGFCODETYPE enmCodeType, PCDBGFSTACKFRAME *ppFirstFrame)
149{
150 return VERR_INTERNAL_ERROR;
151}
152VMMR3DECL(PCDBGFSTACKFRAME) DBGFR3StackWalkNext(PCDBGFSTACKFRAME pCurrent)
153{
154 return NULL;
155}
156VMMR3DECL(void) DBGFR3StackWalkEnd(PCDBGFSTACKFRAME pFirstFrame)
157{
158}
159VMMR3DECL(int) DBGFR3Step(PVM pVM, VMCPUID idCpu)
160{
161 return VERR_INTERNAL_ERROR;
162}
163VMMR3DECL(int) DBGFR3AsSymbolByAddr(PVM pVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, PRTGCINTPTR poffDisplacement, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
164{
165 return VERR_INTERNAL_ERROR;
166}
167VMMR3DECL(int) DBGFR3AsSymbolByName(PVM pVM, RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
168{
169 return VERR_INTERNAL_ERROR;
170}
171VMMR3DECL(int) DBGFR3MemScan(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, RTGCUINTPTR uAlign, const void *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress)
172{
173 return VERR_INTERNAL_ERROR;
174}
175VMMR3DECL(int) DBGFR3MemRead(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead)
176{
177 return VERR_INTERNAL_ERROR;
178}
179VMMR3DECL(int) DBGFR3MemReadString(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cchBuf)
180{
181 return VERR_INTERNAL_ERROR;
182}
183VMMR3DECL(int) DBGFR3MemWrite(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, const void *pvBuf, size_t cbRead)
184{
185 return VERR_INTERNAL_ERROR;
186}
187VMMDECL(int) DBGFR3PagingDumpEx(PVM pVM, VMCPUID idCpu, uint32_t fFlags, uint64_t cr3, uint64_t u64FirstAddr,
188 uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp)
189{
190 return VERR_INTERNAL_ERROR;
191}
192VMMR3DECL(int) DBGFR3RegCpuQueryU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8)
193{
194 return VERR_INTERNAL_ERROR;
195}
196VMMR3DECL(int) DBGFR3RegCpuQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16)
197{
198 return VERR_INTERNAL_ERROR;
199}
200VMMR3DECL(int) DBGFR3RegCpuQueryU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32)
201{
202 return VERR_INTERNAL_ERROR;
203}
204VMMR3DECL(int) DBGFR3RegCpuQueryU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64)
205{
206 return VERR_INTERNAL_ERROR;
207}
208VMMR3DECL(int) DBGFR3RegNmQuery( PVM pVM, VMCPUID idDefCpu, const char *pszReg, PDBGFREGVAL pValue, PDBGFREGVALTYPE penmType)
209{
210 return VERR_INTERNAL_ERROR;
211}
212VMMR3DECL(int) DBGFR3RegPrintf(PVM pVM, VMCPUID idCpu, char *pszBuf, size_t cbBuf, const char *pszFormat, ...)
213{
214 return VERR_INTERNAL_ERROR;
215}
216VMMDECL(ssize_t) DBGFR3RegFormatValue(char *pszBuf, size_t cbBuf, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType, bool fSpecial)
217{
218 return VERR_INTERNAL_ERROR;
219}
220VMMR3DECL(int) DBGFR3RegNmSet(PVM pVM, VMCPUID idDefCpu, const char *pszReg, PCDBGFREGVAL pValue, DBGFREGVALTYPE enmType)
221{
222 return VERR_INTERNAL_ERROR;
223}
224
225VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr)
226{
227 return NULL;
228}
229VMMR3DECL(int) DBGFR3AddrToHostPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
230{
231 return VERR_INTERNAL_ERROR;
232}
233VMMR3DECL(int) DBGFR3AddrToVolatileR3Ptr(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
234{
235 return VERR_INTERNAL_ERROR;
236}
237
238VMMR3DECL(int) DBGFR3OSRegister(PVM pVM, PCDBGFOSREG pReg)
239{
240 return VERR_INTERNAL_ERROR;
241}
242VMMR3DECL(int) DBGFR3OSDetect(PVM pVM, char *pszName, size_t cchName)
243{
244 return VERR_INTERNAL_ERROR;
245}
246VMMR3DECL(int) DBGFR3OSQueryNameAndVersion(PVM pVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion)
247{
248 return VERR_INTERNAL_ERROR;
249}
250
251VMMR3DECL(int) DBGFR3SelQueryInfo(PVM pVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo)
252{
253 return VERR_INTERNAL_ERROR;
254}
255
256VMMR3DECL(int) DBGFR3CoreWrite(PVM pVM, const char *pszFilename, bool fReplaceFile)
257{
258 return VERR_INTERNAL_ERROR;
259}
260
261
262//////////////////////////////////////////////////////////////////////////
263// The rest should eventually be replaced by DBGF calls and eliminated. //
264/////////////////////////////////////////////////////////////////////////
265
266#include <VBox/vmm/cpum.h>
267
268VMMDECL(uint64_t) CPUMGetGuestCR3(PVMCPU pVCpu)
269{
270 return 0;
271}
272
273VMMDECL(uint64_t) CPUMGetGuestCR4(PVMCPU pVCpu)
274{
275 return 0;
276}
277
278VMMDECL(RTSEL) CPUMGetGuestCS(PVMCPU pVCpu)
279{
280 return 0;
281}
282
283VMMDECL(PCCPUMCTXCORE) CPUMGetGuestCtxCore(PVMCPU pVCpu)
284{
285 return NULL;
286}
287
288VMMDECL(uint32_t) CPUMGetGuestEIP(PVMCPU pVCpu)
289{
290 return 0;
291}
292
293VMMDECL(uint64_t) CPUMGetGuestRIP(PVMCPU pVCpu)
294{
295 return 0;
296}
297
298VMMDECL(RTGCPTR) CPUMGetGuestIDTR(PVMCPU pVCpu, uint16_t *pcbLimit)
299{
300 return 0;
301}
302
303VMMDECL(CPUMMODE) CPUMGetGuestMode(PVMCPU pVCpu)
304{
305 return CPUMMODE_INVALID;
306}
307
308VMMDECL(RTSEL) CPUMGetHyperCS(PVMCPU pVCpu)
309{
310 return 0xfff8;
311}
312
313VMMDECL(PCCPUMCTXCORE) CPUMGetHyperCtxCore(PVMCPU pVCpu)
314{
315 return NULL;
316}
317
318VMMDECL(uint32_t) CPUMGetHyperEIP(PVMCPU pVCpu)
319{
320 return 0;
321}
322
323VMMDECL(PCPUMCTX) CPUMQueryGuestCtxPtr(PVMCPU pVCpu)
324{
325 return NULL;
326}
327
328VMMDECL(int) CPUMQueryHyperCtxPtr(PVMCPU pVCpu, PCPUMCTX *ppCtx)
329{
330 return VERR_INTERNAL_ERROR;
331}
332
333
334
335#include <VBox/vmm/mm.h>
336
337VMMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv)
338{
339 return VERR_INTERNAL_ERROR;
340}
341
342
343
344
345#include <VBox/vmm/pgm.h>
346
347VMMDECL(RTHCPHYS) PGMGetHyperCR3(PVMCPU pVCpu)
348{
349 return 0;
350}
351
352VMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu)
353{
354 return PGMMODE_INVALID;
355}
356
357VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PVM pVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
358{
359 return VERR_INTERNAL_ERROR;
360}
361
362VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PVM pVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
363{
364 return VERR_INTERNAL_ERROR;
365}
366VMMR3DECL(int) PGMR3DbgHCPhys2GCPhys(PVM pVM, RTHCPHYS HCPhys, PRTGCPHYS pGCPhys)
367{
368 return VERR_INTERNAL_ERROR;
369}
370
371
372#include <VBox/vmm/vmm.h>
373
374VMMDECL(PVMCPU) VMMGetCpuById(PVM pVM, RTCPUID idCpu)
375{
376 return NULL;
377}
378
379VMMR3DECL(int) VMR3ReqCallWait(PVM pVm, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
380{
381 return VERR_INTERNAL_ERROR;
382}
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