VirtualBox

source: vbox/trunk/src/VBox/Debugger/DBGPlugInSolaris.cpp@ 8911

Last change on this file since 8911 was 8844, checked in by vboxsync, 16 years ago

Dig out the solaris release+version

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 20.7 KB
Line 
1/* $Id: DBGPlugInSolaris.cpp 8844 2008-05-15 11:28:05Z vboxsync $ */
2/** @file
3 * DBGPlugInSolaris - Debugger and Guest OS Digger Plugin For Solaris.
4 */
5
6/*
7 * Copyright (C) 2008 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22
23/*******************************************************************************
24* Header Files *
25*******************************************************************************/
26#define LOG_GROUP LOG_GROUP_DBGF ///@todo add new log group.
27#include "DBGPlugIns.h"
28#include "DBGPlugInCommonELF.h"
29#include <VBox/dbgf.h>
30#include <iprt/string.h>
31#include <iprt/mem.h>
32#include <iprt/stream.h>
33
34
35/*******************************************************************************
36* Structures and Typedefs *
37*******************************************************************************/
38
39/** @name InternalSolaris structures
40 * @{ */
41
42typedef struct SOL32_modctl
43{
44 uint32_t mod_next; /**< 0 */
45 uint32_t mod_prev; /**< 4 */
46 int32_t mod_id; /**< 8 */
47 uint32_t mod_mp; /**< c Pointer to the kernel runtime loader bits. */
48 uint32_t mod_inprogress_thread; /**< 10 */
49 uint32_t mod_modinfo; /**< 14 */
50 uint32_t mod_linkage; /**< 18 */
51 uint32_t mod_filename; /**< 1c */
52 uint32_t mod_modname; /**< 20 */
53 int8_t mod_busy; /**< 24 */
54 int8_t mod_want; /**< 25 */
55 int8_t mod_prim; /**< 26 this is 1 for 'unix' and a few others. */
56 int8_t mod_unused_padding; /**< 27 */
57 int32_t mod_ref; /**< 28 */
58 int8_t mod_loaded; /**< 2c */
59 int8_t mod_installed; /**< 2d */
60 int8_t mod_loadflags; /**< 2e */
61 int8_t mod_delay_unload; /**< 2f */
62 uint32_t mod_requisites; /**< 30 */
63 uint32_t mod___unused; /**< 34 */
64 int32_t mod_loadcnt; /**< 38 */
65 int32_t mod_nenabled; /**< 3c */
66 uint32_t mod_text; /**< 40 */
67 uint32_t mod_text_size; /**< 44 */
68 int32_t mod_gencount; /**< 48 */
69 uint32_t mod_requisite_loading; /**< 4c */
70} SOL32_modctl_t;
71AssertCompileSize(SOL32_modctl_t, 0x50);
72
73typedef struct SOL32_module
74{
75 int32_t total_allocated; /**< 0 */
76 Elf32_Ehdr hdr; /**< 4 Easy to validate */
77 uint32_t shdrs; /**< 38 */
78 uint32_t symhdr; /**< 3c */
79 uint32_t strhdr; /**< 40 */
80 uint32_t depends_on; /**< 44 */
81 uint32_t symsize; /**< 48 */
82 uint32_t symspace; /**< 4c */
83 int32_t flags; /**< 50 */
84 uint32_t text_size; /**< 54 */
85 uint32_t data_size; /**< 58 */
86 uint32_t text; /**< 5c */
87 uint32_t data; /**< 60 */
88 uint32_t symtbl_section; /**< 64 */
89 uint32_t symtbl; /**< 68 */
90 uint32_t strings; /**< 6c */
91 uint32_t hashsize; /**< 70 */
92 uint32_t buckets; /**< 74 */
93 uint32_t chains; /**< 78 */
94 uint32_t nsyms; /**< 7c */
95 uint32_t bss_align; /**< 80 */
96 uint32_t bss_size; /**< 84 */
97 uint32_t bss; /**< 88 */
98 uint32_t filename; /**< 8c */
99 uint32_t head; /**< 90 */
100 uint32_t tail; /**< 94 */
101 uint32_t destination; /**< 98 */
102 uint32_t machdata; /**< 9c */
103 uint32_t ctfdata; /**< a0 */
104 uint32_t ctfsize; /**< a4 */
105 uint32_t fbt_tab; /**< a8 */
106 uint32_t fbt_size; /**< ac */
107 uint32_t fbt_nentries; /**< b0 */
108 uint32_t textwin; /**< b4 */
109 uint32_t textwin_base; /**< b8 */
110 uint32_t sdt_probes; /**< bc */
111 uint32_t sdt_nprobes; /**< c0 */
112 uint32_t sdt_tab; /**< c4 */
113 uint32_t sdt_size; /**< c8 */
114 uint32_t sigdata; /**< cc */
115 uint32_t sigsize; /**< d0 */
116} SOL32_module_t;
117AssertCompileSize(Elf32_Ehdr, 0x34);
118AssertCompileSize(SOL32_module_t, 0xd4);
119
120typedef struct SOL_utsname
121{
122 char sysname[257];
123 char nodename[257];
124 char release[257];
125 char version[257];
126 char machine[257];
127} SOL_utsname_t;
128AssertCompileSize(SOL_utsname_t, 5 * 257);
129
130/** @} */
131
132
133/**
134 * Solaris guest OS digger instance data.
135 */
136typedef struct DBGDIGGERSOLARIS
137{
138 /** Whether the information is valid or not.
139 * (For fending off illegal interface method calls.) */
140 bool fValid;
141
142 /** Address of the 'unix' text segment.
143 * This is set during probing. */
144 DBGFADDRESS AddrUnixText;
145 /** Address of the 'unix' text segment.
146 * This is set during probing. */
147 DBGFADDRESS AddrUnixData;
148 /** Address of the 'unix' modctl_t (aka modules). */
149 DBGFADDRESS AddrUnixModCtl;
150
151} DBGDIGGERSOLARIS;
152/** Pointer to the solaris guest OS digger instance data. */
153typedef DBGDIGGERSOLARIS *PDBGDIGGERSOLARIS;
154
155
156/*******************************************************************************
157* Defined Constants And Macros *
158*******************************************************************************/
159/** Validates a 32-bit solaris kernel address */
160#define SOL32_VALID_ADDRESS(Addr) ((Addr) > UINT32_C(0x80000000) && (Addr) < UINT32_C(0xfffff000))
161
162/** The max data segment size of the 'unix' module. */
163#define SOL_UNIX_MAX_DATA_SEG_SIZE 0x01000000
164
165
166/*******************************************************************************
167* Internal Functions *
168*******************************************************************************/
169static DECLCALLBACK(int) dbgDiggerSolarisInit(PVM pVM, void *pvData);
170
171
172
173/**
174 * @copydoc DBGFOSREG::pfnQueryInterface
175 */
176static DECLCALLBACK(void *) dbgDiggerSolarisQueryInterface(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf)
177{
178 return NULL;
179}
180
181
182/**
183 * @copydoc DBGFOSREG::pfnQueryVersion
184 */
185static DECLCALLBACK(int) dbgDiggerSolarisQueryVersion(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion)
186{
187 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
188 Assert(pThis->fValid);
189
190 /*
191 * It's all in the utsname symbol...
192 */
193 DBGFADDRESS Addr;
194 SOL_utsname_t UtsName;
195 DBGFSYMBOL SymUtsName;
196 int rc = DBGFR3SymbolByName(pVM, "utsname", &SymUtsName);
197 if (RT_SUCCESS(rc))
198 rc = DBGFR3MemRead(pVM, DBGFR3AddrFromFlat(pVM, &Addr, SymUtsName.Value), &UtsName, sizeof(UtsName));
199 if (RT_FAILURE(rc))
200 {
201 /*
202 * Try searching by the name...
203 */
204 memset(&UtsName, '\0', sizeof(UtsName));
205 strcpy(&UtsName.sysname[0], "SunOS");
206 rc = DBGFR3MemScan(pVM, &pThis->AddrUnixData, SOL_UNIX_MAX_DATA_SEG_SIZE,
207 (uint8_t *)&UtsName.sysname[0], sizeof(UtsName.sysname), &Addr);
208 if (RT_SUCCESS(rc))
209 rc = DBGFR3MemRead(pVM, DBGFR3AddrFromFlat(pVM, &Addr, Addr.FlatPtr - RT_OFFSETOF(SOL_utsname_t, sysname)),
210 &UtsName, sizeof(UtsName));
211 }
212
213 /*
214 * Copy out the result (if any).
215 */
216 if (RT_SUCCESS(rc))
217 {
218 if ( UtsName.nodename[-1] != '\0'
219 || UtsName.release[-1] != '\0'
220 || UtsName.version[-1] != '\0'
221 || UtsName.machine[-1] != '\0'
222 || UtsName.machine[sizeof(UtsName.machine) - 1] != '\0')
223 {
224 //rc = VERR_DBGF_UNEXPECTED_OS_DATA;
225 rc = VERR_GENERAL_FAILURE;
226 RTStrPrintf(pszVersion, cchVersion, "failed - bogus utsname");
227 }
228 else
229 RTStrPrintf(pszVersion, cchVersion, "%s %s", UtsName.version, UtsName.release);
230 }
231 else
232 RTStrPrintf(pszVersion, cchVersion, "failed - %Rrc", rc);
233
234 return rc;
235}
236
237
238
239/**
240 * Processes a modctl_t.
241 *
242 * @param pVM The VM handle.
243 * @param pThis Our instance data.
244 * @param pModCtl Pointer to the modctl structure.
245 */
246static void dbgDiggerSolarisProcessModCtl(PVM pVM, PDBGDIGGERSOLARIS pThis, SOL32_modctl_t const *pModCtl)
247{
248 /* skip it if it's not loaded and installed */
249 if ( !pModCtl->mod_loaded
250 || !pModCtl->mod_installed)
251 return;
252
253 /*
254 * Read the module and file names first
255 */
256 char szModName[64];
257 DBGFADDRESS Addr;
258 int rc = DBGFR3MemReadString(pVM, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->mod_modname), szModName, sizeof(szModName));
259 if (RT_FAILURE(rc))
260 return;
261 if (!memchr(szModName, '\0', sizeof(szModName)))
262 szModName[sizeof(szModName) - 1] = '\0';
263
264 char szFilename[256];
265 rc = DBGFR3MemReadString(pVM, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->mod_filename), szFilename, sizeof(szFilename));
266 if (RT_FAILURE(rc))
267 strcpy(szFilename, szModName);
268 else if (!memchr(szFilename, '\0', sizeof(szFilename)))
269 szFilename[sizeof(szFilename) - 1] = '\0';
270
271 /*
272 * Then read the module struct and validate it.
273 */
274 struct SOL32_module Module;
275 rc = DBGFR3MemRead(pVM, DBGFR3AddrFromFlat(pVM, &Addr, pModCtl->mod_mp), &Module, sizeof(Module));
276 if (RT_FAILURE(rc))
277 return;
278
279 /* Basic validations of the elf header. */
280 if ( Module.hdr.e_ident[EI_MAG0] != ELFMAG0
281 || Module.hdr.e_ident[EI_MAG1] != ELFMAG1
282 || Module.hdr.e_ident[EI_MAG2] != ELFMAG2
283 || Module.hdr.e_ident[EI_MAG3] != ELFMAG3
284 || Module.hdr.e_ident[EI_CLASS] != ELFCLASS32
285 || Module.hdr.e_ident[EI_DATA] != ELFDATA2LSB
286 || Module.hdr.e_ident[EI_VERSION] != EV_CURRENT
287 || ASMMemIsAll8(&Module.hdr.e_ident[EI_PAD], EI_NIDENT - EI_PAD, 0) != NULL
288 )
289 return;
290 if (Module.hdr.e_version != EV_CURRENT)
291 return;
292 if (Module.hdr.e_ehsize != sizeof(Module.hdr))
293 return;
294 if ( Module.hdr.e_type != ET_DYN
295 && Module.hdr.e_type != ET_REL
296 && Module.hdr.e_type != ET_EXEC) //??
297 return;
298 if ( Module.hdr.e_machine != EM_386
299 && Module.hdr.e_machine != EM_486)
300 return;
301 if ( Module.hdr.e_phentsize != sizeof(Elf32_Phdr)
302 && Module.hdr.e_phentsize) //??
303 return;
304 if (Module.hdr.e_shentsize != sizeof(Elf32_Shdr))
305 return;
306
307 if (Module.hdr.e_shentsize != sizeof(Elf32_Shdr))
308 return;
309
310 /* Basic validations of the rest of the stuff. */
311 if ( !SOL32_VALID_ADDRESS(Module.shdrs)
312 || !SOL32_VALID_ADDRESS(Module.symhdr)
313 || !SOL32_VALID_ADDRESS(Module.strhdr)
314 || (!SOL32_VALID_ADDRESS(Module.symspace) && Module.symspace)
315 || !SOL32_VALID_ADDRESS(Module.text)
316 || !SOL32_VALID_ADDRESS(Module.data)
317 || (!SOL32_VALID_ADDRESS(Module.symtbl) && Module.symtbl)
318 || (!SOL32_VALID_ADDRESS(Module.strings) && Module.strings)
319 || (!SOL32_VALID_ADDRESS(Module.head) && Module.head)
320 || (!SOL32_VALID_ADDRESS(Module.tail) && Module.tail)
321 || !SOL32_VALID_ADDRESS(Module.filename))
322 return;
323 if ( Module.symsize > _4M
324 || Module.hdr.e_shnum > 4096
325 || Module.nsyms > _256K)
326 return;
327
328 /* Ignore modules without symbols. */
329 if (!Module.symtbl || !Module.strings || !Module.symspace || !Module.symspace)
330 return;
331
332 /* Check that the symtbl and strings points inside the symspace. */
333 if (Module.strings - Module.symspace >= Module.symsize)
334 return;
335 if (Module.symtbl - Module.symspace >= Module.symsize)
336 return;
337
338 /*
339 * Read the section headers, symbol table and string tables.
340 */
341 size_t cb = Module.hdr.e_shnum * sizeof(Elf32_Shdr);
342 Elf32_Shdr *paShdrs = (Elf32_Shdr *)RTMemTmpAlloc(cb);
343 if (!paShdrs)
344 return;
345 rc = DBGFR3MemRead(pVM, DBGFR3AddrFromFlat(pVM, &Addr, Module.shdrs), paShdrs, cb);
346 if (RT_SUCCESS(rc))
347 {
348 void *pvSymSpace = RTMemTmpAlloc(Module.symsize + 1);
349 if (pvSymSpace)
350 {
351 rc = DBGFR3MemRead(pVM, DBGFR3AddrFromFlat(pVM, &Addr, Module.shdrs), pvSymSpace, Module.symsize);
352 if (RT_SUCCESS(rc))
353 {
354 ((uint8_t *)pvSymSpace)[Module.symsize] = 0;
355
356 /*
357 * Hand it over to the common ELF32 module parser.
358 */
359 char const *pbStrings = (char const *)pvSymSpace + (Module.strings - Module.symspace);
360 size_t cbMaxStrings = Module.symsize - (Module.strings - Module.symspace);
361
362 Elf32_Sym const *paSyms = (Elf32_Sym const *)((uintptr_t)pvSymSpace + (Module.symtbl - Module.symspace));
363 size_t cMaxSyms = (Module.symsize - (Module.symtbl - Module.symspace)) / sizeof(Elf32_Sym);
364 cMaxSyms = RT_MIN(cMaxSyms, Module.nsyms);
365
366 DBGDiggerCommonParseElf32Mod(pVM, szModName, szFilename, DBG_DIGGER_ELF_FUNNY_SHDRS,
367 &Module.hdr, paShdrs, paSyms, cMaxSyms, pbStrings, cbMaxStrings);
368 }
369 RTMemTmpFree(pvSymSpace);
370 }
371 }
372
373 RTMemTmpFree(paShdrs);
374 return;
375}
376
377
378/**
379 * @copydoc DBGFOSREG::pfnTerm
380 */
381static DECLCALLBACK(void) dbgDiggerSolarisTerm(PVM pVM, void *pvData)
382{
383 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
384 Assert(pThis->fValid);
385
386 pThis->fValid = false;
387}
388
389
390/**
391 * @copydoc DBGFOSREG::pfnRefresh
392 */
393static DECLCALLBACK(int) dbgDiggerSolarisRefresh(PVM pVM, void *pvData)
394{
395 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
396 Assert(pThis->fValid);
397
398 /*
399 * For now we'll flush and reload everything.
400 */
401 dbgDiggerSolarisTerm(pVM, pvData);
402 return dbgDiggerSolarisInit(pVM, pvData);
403}
404
405
406/**
407 * @copydoc DBGFOSREG::pfnInit
408 */
409static DECLCALLBACK(int) dbgDiggerSolarisInit(PVM pVM, void *pvData)
410{
411 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
412 Assert(!pThis->fValid);
413 int rc;
414
415 /*
416 * Find the 'unix' modctl_t structure (aka modules).
417 * We know it resides in the unix data segment.
418 */
419 DBGFR3AddrFromFlat(pVM, &pThis->AddrUnixModCtl, 0);
420
421 DBGFADDRESS CurAddr = pThis->AddrUnixData;
422 DBGFADDRESS MaxAddr;
423 DBGFR3AddrFromFlat(pVM, &MaxAddr, CurAddr.FlatPtr + SOL_UNIX_MAX_DATA_SEG_SIZE);
424 const uint8_t *pbExpr = (const uint8_t *)&pThis->AddrUnixText.FlatPtr;
425 const uint32_t cbExpr = sizeof(uint32_t);//pThis->AddrUnixText.FlatPtr < _4G ? sizeof(uint32_t) : sizeof(uint64_t)
426 while ( CurAddr.FlatPtr < MaxAddr.FlatPtr
427 && CurAddr.FlatPtr >= pThis->AddrUnixData.FlatPtr)
428 {
429 DBGFADDRESS HitAddr;
430 rc = DBGFR3MemScan(pVM, &CurAddr, MaxAddr.FlatPtr - CurAddr.FlatPtr, pbExpr, cbExpr, &HitAddr);
431 if (RT_FAILURE(rc))
432 break;
433
434 /*
435 * Read out the modctl_t structure.
436 */
437 DBGFADDRESS ModCtlAddr;
438 DBGFR3AddrFromFlat(pVM, &ModCtlAddr, HitAddr.FlatPtr - RT_OFFSETOF(SOL32_modctl_t, mod_text));
439 SOL32_modctl_t ModCtl;
440 rc = DBGFR3MemRead(pVM, &ModCtlAddr, &ModCtl, sizeof(ModCtl));
441 if (RT_SUCCESS(rc))
442 {
443 if ( SOL32_VALID_ADDRESS(ModCtl.mod_next)
444 && SOL32_VALID_ADDRESS(ModCtl.mod_prev)
445 && ModCtl.mod_id == 0
446 && SOL32_VALID_ADDRESS(ModCtl.mod_mp)
447 && SOL32_VALID_ADDRESS(ModCtl.mod_filename)
448 && SOL32_VALID_ADDRESS(ModCtl.mod_modname)
449 && ModCtl.mod_prim == 1
450 && ModCtl.mod_loaded == 1
451 && ModCtl.mod_installed == 1
452 && ModCtl.mod_requisites == 0
453 && ModCtl.mod_loadcnt == 1
454 /*&& ModCtl.mod_text == pThis->AddrUnixText.FlatPtr*/
455 && ModCtl.mod_text_size < UINT32_C(0xfec00000) - UINT32_C(0xfe800000) )
456 {
457 char szUnix[5];
458 DBGFADDRESS NameAddr;
459 DBGFR3AddrFromFlat(pVM, &NameAddr, ModCtl.mod_modname);
460 rc = DBGFR3MemRead(pVM, &NameAddr, &szUnix, sizeof(szUnix));
461 if (RT_SUCCESS(rc))
462 {
463 if (!strcmp(szUnix, "unix"))
464 {
465 pThis->AddrUnixModCtl = ModCtlAddr;
466 break;
467 }
468 Log(("sol32 mod_name=%.*s\n", sizeof(szUnix), szUnix));
469 }
470 }
471 }
472
473 /* next */
474 DBGFR3AddrFromFlat(pVM, &CurAddr, HitAddr.FlatPtr + cbExpr);
475 }
476
477 /*
478 * Walk the module chain and add the modules and their symbols.
479 */
480 if (pThis->AddrUnixModCtl.FlatPtr)
481 {
482 int iMod = 0;
483 CurAddr = pThis->AddrUnixModCtl;
484 do
485 {
486 /* read it */
487 SOL32_modctl_t ModCtl;
488 rc = DBGFR3MemRead(pVM, &CurAddr, &ModCtl, sizeof(ModCtl));
489 if (RT_FAILURE(rc))
490 {
491 LogRel(("sol32: bad modctl_t chain: %RGv - %Rrc\n", iMod, CurAddr.FlatPtr, rc));
492 break;
493 }
494
495 /* process it. */
496 dbgDiggerSolarisProcessModCtl(pVM, pThis, &ModCtl);
497
498 /* next */
499 if (!SOL32_VALID_ADDRESS(ModCtl.mod_next))
500 {
501 LogRel(("sol32: bad modctl_t chain at %RGv: %RGv\n", iMod, CurAddr.FlatPtr, (RTGCUINTPTR)ModCtl.mod_next));
502 break;
503 }
504 if (++iMod >= 1024)
505 {
506 LogRel(("sol32: too many modules (%d)\n", iMod));
507 break;
508 }
509 DBGFR3AddrFromFlat(pVM, &CurAddr, ModCtl.mod_next);
510 } while (CurAddr.FlatPtr != pThis->AddrUnixModCtl.FlatPtr);
511 }
512
513 pThis->fValid = true;
514 return VINF_SUCCESS;
515}
516
517
518/**
519 * @copydoc DBGFOSREG::pfnProbe
520 */
521static DECLCALLBACK(bool) dbgDiggerSolarisProbe(PVM pVM, void *pvData)
522{
523 PDBGDIGGERSOLARIS pThis = (PDBGDIGGERSOLARIS)pvData;
524
525 /*
526 * Look for "SunOS Release" in the text segment.
527 */
528 DBGFADDRESS Addr;
529 DBGFR3AddrFromFlat(pVM, &Addr, 0xfe800000);
530 RTGCUINTPTR cbRange = 0xfec00000 - 0xfe800000;
531
532 DBGFADDRESS HitAddr;
533 static const uint8_t s_abSunRelease[] = "SunOS Release ";
534 int rc = DBGFR3MemScan(pVM, &Addr, cbRange, s_abSunRelease, sizeof(s_abSunRelease) - 1, &HitAddr);
535 if (RT_FAILURE(rc))
536 return false;
537
538 /*
539 * Look for the copy right string too, just to be sure.
540 */
541 static const uint8_t s_abSMI[] = "Sun Microsystems, Inc.";
542 rc = DBGFR3MemScan(pVM, &Addr, cbRange, s_abSMI, sizeof(s_abSMI) - 1, &HitAddr);
543 if (RT_FAILURE(rc))
544 return false;
545
546 /*
547 * Remember the unix text and data addresses (32-bit vs 64-bit).
548 */
549 pThis->AddrUnixText = Addr;
550// if (pThis->AddrUnixText.FlatPtr == 0xfe800000)
551 {
552 DBGFR3AddrFromFlat(pVM, &Addr, 0xfec00000);
553 pThis->AddrUnixData = Addr;
554 }
555// else
556// {
557// DBGFR3AddrFromFlat(pVM, &Addr, UINT64_C(0xwhateveritis));
558// pThis->AddrUnixData = Addr;
559// }
560
561 return true;
562}
563
564
565/**
566 * @copydoc DBGFOSREG::pfnDestruct
567 */
568static DECLCALLBACK(void) dbgDiggerSolarisDestruct(PVM pVM, void *pvData)
569{
570
571}
572
573
574/**
575 * @copydoc DBGFOSREG::pfnConstruct
576 */
577static DECLCALLBACK(int) dbgDiggerSolarisConstruct(PVM pVM, void *pvData)
578{
579 return VINF_SUCCESS;
580}
581
582
583const DBGFOSREG g_DBGDiggerSolaris =
584{
585 /* .u32Magic = */ DBGFOSREG_MAGIC,
586 /* .fFlags = */ 0,
587 /* .cbData = */ sizeof(DBGDIGGERSOLARIS),
588 /* .szName = */ "Solaris",
589 /* .pfnConstruct = */ dbgDiggerSolarisConstruct,
590 /* .pfnDestruct = */ dbgDiggerSolarisDestruct,
591 /* .pfnProbe = */ dbgDiggerSolarisProbe,
592 /* .pfnInit = */ dbgDiggerSolarisInit,
593 /* .pfnRefresh = */ dbgDiggerSolarisRefresh,
594 /* .pfnTerm = */ dbgDiggerSolarisTerm,
595 /* .pfnQueryVersion = */ dbgDiggerSolarisQueryVersion,
596 /* .pfnQueryInterface = */ dbgDiggerSolarisQueryInterface,
597 /* .u32EndMagic = */ DBGFOSREG_MAGIC
598};
599
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