VirtualBox

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

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

The debugger is back in the OSE.

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