3
* VBox Debugger GUI - Base class.
7
* Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
13
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14
* distribution. VirtualBox OSE is distributed in the hope that it will
15
* be useful, but WITHOUT ANY WARRANTY of any kind.
19
/*******************************************************************************
21
*******************************************************************************/
23
#include <iprt/assert.h>
24
#include "VBoxDbgBase.h"
28
VBoxDbgBase::VBoxDbgBase(PVM pVM) : m_pVM(pVM)
33
int rc = VMR3AtStateRegister(pVM, atStateChange, this);
37
VBoxDbgBase::~VBoxDbgBase()
40
* If the VM is still around.
44
int rc = VMR3AtStateDeregister(m_pVM, atStateChange, this);
50
int VBoxDbgBase::stamReset(const char *pszPat)
53
return STAMR3Reset(m_pVM, pszPat);
54
return VERR_INVALID_HANDLE;
57
int VBoxDbgBase::stamEnum(const char *pszPat, PFNSTAMR3ENUM pfnEnum, void *pvUser)
60
return STAMR3Enum(m_pVM, pszPat, pfnEnum, pvUser);
61
return VERR_INVALID_HANDLE;
64
int VBoxDbgBase::dbgcCreate(PDBGCBACK pBack, unsigned fFlags)
67
return DBGCCreate(m_pVM, pBack, fFlags);
68
return VERR_INVALID_HANDLE;
71
/*static*/ DECLCALLBACK(void) VBoxDbgBase::atStateChange(PVM /*pVM*/, VMSTATE enmState, VMSTATE /*enmOldState*/, void *pvUser)
73
VBoxDbgBase *pThis = (VBoxDbgBase *)pvUser;
76
case VMSTATE_TERMINATED:
77
pThis->sigTerminated();
86
void VBoxDbgBase::sigTerminated()