1 | /* $Id: tstDBGCStubs.cpp 32313 2010-09-08 11:46:16Z 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/vm.h>
|
---|
20 |
|
---|
21 |
|
---|
22 |
|
---|
23 | #include <VBox/dbgf.h>
|
---|
24 | VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr)
|
---|
25 | {
|
---|
26 | return NULL;
|
---|
27 | }
|
---|
28 |
|
---|
29 | VMMR3DECL(int) DBGFR3AddrFromSelOff(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off)
|
---|
30 | {
|
---|
31 | return VERR_INTERNAL_ERROR;
|
---|
32 | }
|
---|
33 |
|
---|
34 | VMMR3DECL(int) DBGFR3AddrToPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys)
|
---|
35 | {
|
---|
36 | return VERR_INTERNAL_ERROR;
|
---|
37 | }
|
---|
38 |
|
---|
39 | VMMR3DECL(int) DBGFR3AddrToHostPhys(PVMCPU pVCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
|
---|
40 | {
|
---|
41 | return VERR_INTERNAL_ERROR;
|
---|
42 | }
|
---|
43 |
|
---|
44 | VMMR3DECL(int) DBGFR3AddrToVolatileR3Ptr(PVMCPU pVCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
|
---|
45 | {
|
---|
46 | return VERR_INTERNAL_ERROR;
|
---|
47 | }
|
---|
48 |
|
---|
49 | VMMR3DECL(int) DBGFR3Attach(PVM pVM)
|
---|
50 | {
|
---|
51 | return VERR_INTERNAL_ERROR;
|
---|
52 | }
|
---|
53 |
|
---|
54 | VMMR3DECL(int) DBGFR3BpClear(PVM pVM, RTUINT iBp)
|
---|
55 | {
|
---|
56 | return VERR_INTERNAL_ERROR;
|
---|
57 | }
|
---|
58 | VMMR3DECL(int) DBGFR3BpDisable(PVM pVM, RTUINT iBp)
|
---|
59 | {
|
---|
60 | return VERR_INTERNAL_ERROR;
|
---|
61 | }
|
---|
62 | VMMR3DECL(int) DBGFR3BpEnable(PVM pVM, RTUINT iBp)
|
---|
63 | {
|
---|
64 | return VERR_INTERNAL_ERROR;
|
---|
65 | }
|
---|
66 | VMMR3DECL(int) DBGFR3BpEnum(PVM pVM, PFNDBGFBPENUM pfnCallback, void *pvUser)
|
---|
67 | {
|
---|
68 | return VERR_INTERNAL_ERROR;
|
---|
69 | }
|
---|
70 | VMMR3DECL(int) DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
|
---|
71 | {
|
---|
72 | return VERR_INTERNAL_ERROR;
|
---|
73 | }
|
---|
74 | VMMR3DECL(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 | }
|
---|
79 | VMMR3DECL(int) DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp)
|
---|
80 | {
|
---|
81 | return VERR_INTERNAL_ERROR;
|
---|
82 | }
|
---|
83 | VMMR3DECL(bool) DBGFR3CanWait(PVM pVM)
|
---|
84 | {
|
---|
85 | return true;
|
---|
86 | }
|
---|
87 | VMMR3DECL(int) DBGFR3Detach(PVM pVM)
|
---|
88 | {
|
---|
89 | return VERR_INTERNAL_ERROR;
|
---|
90 | }
|
---|
91 | VMMR3DECL(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 | }
|
---|
96 | VMMR3DECL(int) DBGFR3EventWait(PVM pVM, RTMSINTERVAL cMillies, PCDBGFEVENT *ppEvent)
|
---|
97 | {
|
---|
98 | return VERR_INTERNAL_ERROR;
|
---|
99 | }
|
---|
100 | VMMR3DECL(int) DBGFR3Halt(PVM pVM)
|
---|
101 | {
|
---|
102 | return VERR_INTERNAL_ERROR;
|
---|
103 | }
|
---|
104 | VMMR3DECL(int) DBGFR3Info(PVM pVM, const char *pszName, const char *pszArgs, PCDBGFINFOHLP pHlp)
|
---|
105 | {
|
---|
106 | return VERR_INTERNAL_ERROR;
|
---|
107 | }
|
---|
108 | VMMR3DECL(bool) DBGFR3IsHalted(PVM pVM)
|
---|
109 | {
|
---|
110 | return true;
|
---|
111 | }
|
---|
112 | VMMR3DECL(int) DBGFR3LineByAddr(PVM pVM, RTGCUINTPTR Address, PRTGCINTPTR poffDisplacement, PDBGFLINE pLine)
|
---|
113 | {
|
---|
114 | return VERR_INTERNAL_ERROR;
|
---|
115 | }
|
---|
116 | VMMR3DECL(int) DBGFR3LogModifyDestinations(PVM pVM, const char *pszDestSettings)
|
---|
117 | {
|
---|
118 | return VERR_INTERNAL_ERROR;
|
---|
119 | }
|
---|
120 | VMMR3DECL(int) DBGFR3LogModifyFlags(PVM pVM, const char *pszFlagSettings)
|
---|
121 | {
|
---|
122 | return VERR_INTERNAL_ERROR;
|
---|
123 | }
|
---|
124 | VMMR3DECL(int) DBGFR3LogModifyGroups(PVM pVM, const char *pszGroupSettings)
|
---|
125 | {
|
---|
126 | return VERR_INTERNAL_ERROR;
|
---|
127 | }
|
---|
128 | VMMR3DECL(int) DBGFR3ModuleLoad(PVM pVM, const char *pszFilename, RTGCUINTPTR AddressDelta, const char *pszName, RTGCUINTPTR ModuleAddress, unsigned cbImage)
|
---|
129 | {
|
---|
130 | return VERR_INTERNAL_ERROR;
|
---|
131 | }
|
---|
132 | VMMR3DECL(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 | }
|
---|
136 | VMMR3DECL(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 | }
|
---|
140 | VMMR3DECL(RTDBGAS) DBGFR3AsResolveAndRetain(PVM pVM, RTDBGAS hAlias)
|
---|
141 | {
|
---|
142 | return NIL_RTDBGAS;
|
---|
143 | }
|
---|
144 | VMMR3DECL(int) DBGFR3Resume(PVM pVM)
|
---|
145 | {
|
---|
146 | return VERR_INTERNAL_ERROR;
|
---|
147 | }
|
---|
148 | VMMR3DECL(int) DBGFR3StackWalkBegin(PVM pVM, VMCPUID idCpu, DBGFCODETYPE enmCodeType, PCDBGFSTACKFRAME *ppFirstFrame)
|
---|
149 | {
|
---|
150 | return VERR_INTERNAL_ERROR;
|
---|
151 | }
|
---|
152 | VMMR3DECL(PCDBGFSTACKFRAME) DBGFR3StackWalkNext(PCDBGFSTACKFRAME pCurrent)
|
---|
153 | {
|
---|
154 | return NULL;
|
---|
155 | }
|
---|
156 | VMMR3DECL(void) DBGFR3StackWalkEnd(PCDBGFSTACKFRAME pFirstFrame)
|
---|
157 | {
|
---|
158 | }
|
---|
159 | VMMR3DECL(int) DBGFR3Step(PVM pVM, VMCPUID idCpu)
|
---|
160 | {
|
---|
161 | return VERR_INTERNAL_ERROR;
|
---|
162 | }
|
---|
163 | VMMR3DECL(int) DBGFR3AsSymbolByAddr(PVM pVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, PRTGCINTPTR poffDisplacement, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
|
---|
164 | {
|
---|
165 | return VERR_INTERNAL_ERROR;
|
---|
166 | }
|
---|
167 | VMMR3DECL(int) DBGFR3AsSymbolByName(PVM pVM, RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
|
---|
168 | {
|
---|
169 | return VERR_INTERNAL_ERROR;
|
---|
170 | }
|
---|
171 | VMMR3DECL(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 | }
|
---|
175 | VMMR3DECL(int) DBGFR3MemRead(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead)
|
---|
176 | {
|
---|
177 | return VERR_INTERNAL_ERROR;
|
---|
178 | }
|
---|
179 | VMMR3DECL(int) DBGFR3MemReadString(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cchBuf)
|
---|
180 | {
|
---|
181 | return VERR_INTERNAL_ERROR;
|
---|
182 | }
|
---|
183 | VMMR3DECL(int) DBGFR3MemWrite(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, const void *pvBuf, size_t cbRead)
|
---|
184 | {
|
---|
185 | return VERR_INTERNAL_ERROR;
|
---|
186 | }
|
---|
187 | VMMDECL(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 | }
|
---|
192 | VMMR3DECL(int) DBGFR3RegQueryU8( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint8_t *pu8)
|
---|
193 | {
|
---|
194 | return VERR_INTERNAL_ERROR;
|
---|
195 | }
|
---|
196 | VMMR3DECL(int) DBGFR3RegQueryU16( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint16_t *pu16)
|
---|
197 | {
|
---|
198 | return VERR_INTERNAL_ERROR;
|
---|
199 | }
|
---|
200 | VMMR3DECL(int) DBGFR3RegQueryU32( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint32_t *pu32)
|
---|
201 | {
|
---|
202 | return VERR_INTERNAL_ERROR;
|
---|
203 | }
|
---|
204 | VMMR3DECL(int) DBGFR3RegQueryU64( PVM pVM, VMCPUID idCpu, DBGFREG enmReg, uint64_t *pu64)
|
---|
205 | {
|
---|
206 | return VERR_INTERNAL_ERROR;
|
---|
207 | }
|
---|
208 | VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr)
|
---|
209 | {
|
---|
210 | return NULL;
|
---|
211 | }
|
---|
212 | VMMR3DECL(int) DBGFR3AddrToHostPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys)
|
---|
213 | {
|
---|
214 | return VERR_INTERNAL_ERROR;
|
---|
215 | }
|
---|
216 | VMMR3DECL(int) DBGFR3AddrToVolatileR3Ptr(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr)
|
---|
217 | {
|
---|
218 | return VERR_INTERNAL_ERROR;
|
---|
219 | }
|
---|
220 |
|
---|
221 | VMMR3DECL(int) DBGFR3OSRegister(PVM pVM, PCDBGFOSREG pReg)
|
---|
222 | {
|
---|
223 | return VERR_INTERNAL_ERROR;
|
---|
224 | }
|
---|
225 | VMMR3DECL(int) DBGFR3OSDetect(PVM pVM, char *pszName, size_t cchName)
|
---|
226 | {
|
---|
227 | return VERR_INTERNAL_ERROR;
|
---|
228 | }
|
---|
229 | VMMR3DECL(int) DBGFR3OSQueryNameAndVersion(PVM pVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion)
|
---|
230 | {
|
---|
231 | return VERR_INTERNAL_ERROR;
|
---|
232 | }
|
---|
233 |
|
---|
234 | VMMR3DECL(int) DBGFR3SelQueryInfo(PVM pVM, VMCPUID idCpu, RTSEL Sel, uint32_t fFlags, PDBGFSELINFO pSelInfo)
|
---|
235 | {
|
---|
236 | return VERR_INTERNAL_ERROR;
|
---|
237 | }
|
---|
238 |
|
---|
239 | VMMR3DECL(int) DBGFR3CoreWrite(PVM pVM, const char *pszDumpPath)
|
---|
240 | {
|
---|
241 | return VERR_INTERNAL_ERROR;
|
---|
242 | }
|
---|
243 |
|
---|
244 |
|
---|
245 | //////////////////////////////////////////////////////////////////////////
|
---|
246 | // The rest should eventually be replaced by DBGF calls and eliminated. //
|
---|
247 | /////////////////////////////////////////////////////////////////////////
|
---|
248 |
|
---|
249 | #include <VBox/cpum.h>
|
---|
250 |
|
---|
251 | VMMDECL(uint64_t) CPUMGetGuestCR3(PVMCPU pVCpu)
|
---|
252 | {
|
---|
253 | return 0;
|
---|
254 | }
|
---|
255 |
|
---|
256 | VMMDECL(uint64_t) CPUMGetGuestCR4(PVMCPU pVCpu)
|
---|
257 | {
|
---|
258 | return 0;
|
---|
259 | }
|
---|
260 |
|
---|
261 | VMMDECL(RTSEL) CPUMGetGuestCS(PVMCPU pVCpu)
|
---|
262 | {
|
---|
263 | return 0;
|
---|
264 | }
|
---|
265 |
|
---|
266 | VMMDECL(PCCPUMCTXCORE) CPUMGetGuestCtxCore(PVMCPU pVCpu)
|
---|
267 | {
|
---|
268 | return NULL;
|
---|
269 | }
|
---|
270 |
|
---|
271 | VMMDECL(uint32_t) CPUMGetGuestEIP(PVMCPU pVCpu)
|
---|
272 | {
|
---|
273 | return 0;
|
---|
274 | }
|
---|
275 |
|
---|
276 | VMMDECL(uint64_t) CPUMGetGuestRIP(PVMCPU pVCpu)
|
---|
277 | {
|
---|
278 | return 0;
|
---|
279 | }
|
---|
280 |
|
---|
281 | VMMDECL(RTGCPTR) CPUMGetGuestIDTR(PVMCPU pVCpu, uint16_t *pcbLimit)
|
---|
282 | {
|
---|
283 | return 0;
|
---|
284 | }
|
---|
285 |
|
---|
286 | VMMDECL(CPUMMODE) CPUMGetGuestMode(PVMCPU pVCpu)
|
---|
287 | {
|
---|
288 | return CPUMMODE_INVALID;
|
---|
289 | }
|
---|
290 |
|
---|
291 | VMMDECL(RTSEL) CPUMGetHyperCS(PVMCPU pVCpu)
|
---|
292 | {
|
---|
293 | return 0xfff8;
|
---|
294 | }
|
---|
295 |
|
---|
296 | VMMDECL(PCCPUMCTXCORE) CPUMGetHyperCtxCore(PVMCPU pVCpu)
|
---|
297 | {
|
---|
298 | return NULL;
|
---|
299 | }
|
---|
300 |
|
---|
301 | VMMDECL(uint32_t) CPUMGetHyperEIP(PVMCPU pVCpu)
|
---|
302 | {
|
---|
303 | return 0;
|
---|
304 | }
|
---|
305 |
|
---|
306 | VMMDECL(PCPUMCTX) CPUMQueryGuestCtxPtr(PVMCPU pVCpu)
|
---|
307 | {
|
---|
308 | return NULL;
|
---|
309 | }
|
---|
310 |
|
---|
311 | VMMDECL(int) CPUMQueryHyperCtxPtr(PVMCPU pVCpu, PCPUMCTX *ppCtx)
|
---|
312 | {
|
---|
313 | return VERR_INTERNAL_ERROR;
|
---|
314 | }
|
---|
315 |
|
---|
316 |
|
---|
317 |
|
---|
318 | #include <VBox/mm.h>
|
---|
319 |
|
---|
320 | VMMR3DECL(int) MMR3HCPhys2HCVirt(PVM pVM, RTHCPHYS HCPhys, void **ppv)
|
---|
321 | {
|
---|
322 | return VERR_INTERNAL_ERROR;
|
---|
323 | }
|
---|
324 |
|
---|
325 |
|
---|
326 |
|
---|
327 |
|
---|
328 | #include <VBox/pgm.h>
|
---|
329 |
|
---|
330 | VMMDECL(RTHCPHYS) PGMGetHyperCR3(PVMCPU pVCpu)
|
---|
331 | {
|
---|
332 | return 0;
|
---|
333 | }
|
---|
334 |
|
---|
335 | VMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu)
|
---|
336 | {
|
---|
337 | return PGMMODE_INVALID;
|
---|
338 | }
|
---|
339 |
|
---|
340 | VMMR3DECL(int) PGMR3DbgR3Ptr2GCPhys(PVM pVM, RTR3PTR R3Ptr, PRTGCPHYS pGCPhys)
|
---|
341 | {
|
---|
342 | return VERR_INTERNAL_ERROR;
|
---|
343 | }
|
---|
344 |
|
---|
345 | VMMR3DECL(int) PGMR3DbgR3Ptr2HCPhys(PVM pVM, RTR3PTR R3Ptr, PRTHCPHYS pHCPhys)
|
---|
346 | {
|
---|
347 | return VERR_INTERNAL_ERROR;
|
---|
348 | }
|
---|
349 |
|
---|
350 |
|
---|
351 | #include <VBox/vmm.h>
|
---|
352 |
|
---|
353 | VMMDECL(PVMCPU) VMMGetCpuById(PVM pVM, RTCPUID idCpu)
|
---|
354 | {
|
---|
355 | return NULL;
|
---|
356 | }
|
---|
357 |
|
---|
358 | VMMR3DECL(int) VMR3ReqCallWait(PVM pVm, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
|
---|
359 | {
|
---|
360 | return VERR_INTERNAL_ERROR;
|
---|
361 | }
|
---|