summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/include/DBGFInternal.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/VMM/include/DBGFInternal.h
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/VMM/include/DBGFInternal.h')
-rw-r--r--src/VBox/VMM/include/DBGFInternal.h112
1 files changed, 58 insertions, 54 deletions
diff --git a/src/VBox/VMM/include/DBGFInternal.h b/src/VBox/VMM/include/DBGFInternal.h
index 55c147de..8e01d2d3 100644
--- a/src/VBox/VMM/include/DBGFInternal.h
+++ b/src/VBox/VMM/include/DBGFInternal.h
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2007 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -24,6 +24,7 @@
#include <iprt/critsect.h>
#include <iprt/string.h>
#include <iprt/avl.h>
+#include <iprt/dbg.h>
#include <VBox/vmm/dbgf.h>
@@ -232,22 +233,6 @@ typedef struct DBGF
* Not all commands take data. */
DBGFCMDDATA VMMCmdData;
- /** List of registered info handlers. */
- R3PTRTYPE(PDBGFINFO) pInfoFirst;
- /** Critical section protecting the above list. */
- RTCRITSECT InfoCritSect;
-
- /** Range tree containing the loaded symbols of the a VM.
- * This tree will never have blind spots. */
- R3PTRTYPE(AVLRGCPTRTREE) SymbolTree;
- /** Symbol name space. */
- R3PTRTYPE(PRTSTRSPACE) pSymbolSpace;
- /** Indicates whether DBGFSym.cpp is initialized or not.
- * This part is initialized in a lazy manner for performance reasons. */
- bool fSymInited;
- /** Alignment padding. */
- uint32_t uAlignment0;
-
/** The number of hardware breakpoints. */
uint32_t cHwBreakpoints;
/** The number of active breakpoints. */
@@ -258,7 +243,45 @@ typedef struct DBGF
/** Array of int 3 and REM breakpoints. (4..)
* @remark This is currently a fixed size array for reasons of simplicity. */
DBGFBP aBreakpoints[32];
+} DBGF;
+/** Pointer to DBGF Data. */
+typedef DBGF *PDBGF;
+
+
+/** Converts a DBGFCPU pointer into a VM pointer. */
+#define DBGFCPU_2_VM(pDbgfCpu) ((PVM)((uint8_t *)(pDbgfCpu) + (pDbgfCpu)->offVM))
+
+/**
+ * The per CPU data for DBGF.
+ */
+typedef struct DBGFCPU
+{
+ /** The offset into the VM structure.
+ * @see DBGFCPU_2_VM(). */
+ uint32_t offVM;
+
+ /** Current active breakpoint (id).
+ * This is ~0U if not active. It is set when a execution engine
+ * encounters a breakpoint and returns VINF_EM_DBG_BREAKPOINT. This is
+ * currently not used for REM breakpoints because of the lazy coupling
+ * between VBox and REM. */
+ uint32_t iActiveBp;
+ /** Set if we're singlestepping in raw mode.
+ * This is checked and cleared in the \#DB handler. */
+ bool fSingleSteppingRaw;
+
+ /** Padding the structure to 16 bytes. */
+ bool afReserved[7];
+} DBGFCPU;
+/** Pointer to DBGFCPU data. */
+typedef DBGFCPU *PDBGFCPU;
+
+/**
+ * The DBGF data kept in the UVM.
+ */
+typedef struct DBGFUSERPERVM
+{
/** The address space database lock. */
RTSEMRW hAsDbLock;
/** The address space handle database. (Protected by hAsDbLock.) */
@@ -273,6 +296,8 @@ typedef struct DBGF
bool volatile afAsAliasPopuplated[DBGF_AS_COUNT];
/** Alignment padding. */
bool afAlignment1[2];
+ /** Debug configuration. */
+ R3PTRTYPE(RTDBGCFG) hDbgCfg;
/** The register database lock. */
RTSEMRW hRegDbLock;
@@ -292,56 +317,35 @@ typedef struct DBGF
R3PTRTYPE(PDBGFOS) pCurOS;
/** The head of the Guest OS digger instances. */
R3PTRTYPE(PDBGFOS) pOSHead;
-} DBGF;
-/** Pointer to DBGF Data. */
-typedef DBGF *PDBGF;
+ /** List of registered info handlers. */
+ R3PTRTYPE(PDBGFINFO) pInfoFirst;
+ /** Critical section protecting the above list. */
+ RTCRITSECT InfoCritSect;
-/** Converts a DBGFCPU pointer into a VM pointer. */
-#define DBGFCPU_2_VM(pDbgfCpu) ((PVM)((uint8_t *)(pDbgfCpu) + (pDbgfCpu)->offVM))
+} DBGFUSERPERVM;
/**
- * The per CPU data for DBGF.
+ * The per-CPU DBGF data kept in the UVM.
*/
-typedef struct DBGFCPU
+typedef struct DBGFUSERPERVMCPU
{
- /** The offset into the VM structure.
- * @see DBGFCPU_2_VM(). */
- uint32_t offVM;
-
- /** Current active breakpoint (id).
- * This is ~0U if not active. It is set when a execution engine
- * encounters a breakpoint and returns VINF_EM_DBG_BREAKPOINT. This is
- * currently not used for REM breakpoints because of the lazy coupling
- * between VBox and REM. */
- uint32_t iActiveBp;
- /** Set if we're singlestepping in raw mode.
- * This is checked and cleared in the \#DB handler. */
- bool fSingleSteppingRaw;
-
- /** Padding the structure to 16 bytes. */
- bool afReserved[7];
-
/** The guest register set for this CPU. Can be NULL. */
R3PTRTYPE(struct DBGFREGSET *) pGuestRegSet;
/** The hypervisor register set for this CPU. Can be NULL. */
R3PTRTYPE(struct DBGFREGSET *) pHyperRegSet;
-} DBGFCPU;
-/** Pointer to DBGFCPU data. */
-typedef DBGFCPU *PDBGFCPU;
+} DBGFUSERPERVMCPU;
-int dbgfR3AsInit(PVM pVM);
-void dbgfR3AsTerm(PVM pVM);
-void dbgfR3AsRelocate(PVM pVM, RTGCUINTPTR offDelta);
+int dbgfR3AsInit(PUVM pUVM);
+void dbgfR3AsTerm(PUVM pUVM);
+void dbgfR3AsRelocate(PUVM pUVM, RTGCUINTPTR offDelta);
int dbgfR3BpInit(PVM pVM);
-int dbgfR3InfoInit(PVM pVM);
-int dbgfR3InfoTerm(PVM pVM);
-void dbgfR3OSTerm(PVM pVM);
-int dbgfR3RegInit(PVM pVM);
-void dbgfR3RegTerm(PVM pVM);
-int dbgfR3SymInit(PVM pVM);
-int dbgfR3SymTerm(PVM pVM);
+int dbgfR3InfoInit(PUVM pUVM);
+int dbgfR3InfoTerm(PUVM pUVM);
+void dbgfR3OSTerm(PUVM pUVM);
+int dbgfR3RegInit(PUVM pUVM);
+void dbgfR3RegTerm(PUVM pUVM);
int dbgfR3TraceInit(PVM pVM);
void dbgfR3TraceRelocate(PVM pVM);
void dbgfR3TraceTerm(PVM pVM);