VirtualBox

source: vbox/trunk/src/VBox/Debugger/DBGPlugInDiggers.cpp@ 53369

Last change on this file since 53369 was 49044, checked in by vboxsync, 11 years ago

Darwin guest OS digger hacking in progress. Adding symbol cache util to iprt and started on the Mach-O code that'll make use of it (RTDbgModCreateFromMachOImage++). Updates kStuff from 53 to 55 for UUID query and 64-bit kext loading.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: DBGPlugInDiggers.cpp 49044 2013-10-11 01:06:28Z vboxsync $ */
2/** @file
3 * DBGPlugInDiggers - Debugger and Guest OS Digger Plug-in.
4 */
5
6/*
7 * Copyright (C) 2006-2013 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
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#define LOG_GROUP LOG_GROUP_DBGC
23#include <VBox/dbg.h>
24#include <VBox/vmm/dbgf.h>
25#include "DBGPlugIns.h"
26#include <VBox/version.h>
27#include <VBox/err.h>
28
29
30DECLEXPORT(int) DBGCPlugInEntry(DBGCPLUGINOP enmOperation, PUVM pUVM, uintptr_t uArg)
31{
32 static PCDBGFOSREG s_aPlugIns[] =
33 {
34 &g_DBGDiggerDarwin,
35 //&g_DBGDiggerFreeBSD,
36 &g_DBGDiggerLinux,
37 &g_DBGDiggerOS2,
38 &g_DBGDiggerSolaris,
39 &g_DBGDiggerWinNt
40 };
41
42 switch (enmOperation)
43 {
44 case DBGCPLUGINOP_INIT:
45 {
46 if (uArg != VBOX_VERSION)
47 return VERR_VERSION_MISMATCH;
48
49 for (unsigned i = 0; i < RT_ELEMENTS(s_aPlugIns); i++)
50 {
51 int rc = DBGFR3OSRegister(pUVM, s_aPlugIns[i]);
52 if (RT_FAILURE(rc))
53 {
54 AssertRC(rc);
55 while (i-- > 0)
56 DBGFR3OSDeregister(pUVM, s_aPlugIns[i]);
57 return rc;
58 }
59 }
60 return VINF_SUCCESS;
61 }
62
63 case DBGCPLUGINOP_TERM:
64 {
65 for (unsigned i = 0; i < RT_ELEMENTS(s_aPlugIns); i++)
66 {
67 int rc = DBGFR3OSDeregister(pUVM, s_aPlugIns[i]);
68 AssertRC(rc);
69 }
70 return VINF_SUCCESS;
71 }
72
73 default:
74 return VERR_NOT_SUPPORTED;
75 }
76}
77
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