Index: trunk/include/VBox/dbgf.h
===================================================================
--- trunk/include/VBox/dbgf.h	(revision 19285)
+++ trunk/include/VBox/dbgf.h	(revision 19286)
@@ -46,10 +46,10 @@
 
 #ifdef IN_RC
-/** @addgroup grp_dbgf_gc  The GC DBGF API
+/** @addgroup grp_dbgf_gc  The RC DBGF API
  * @ingroup grp_dbgf
  * @{
  */
-VMMRCDECL(int) DBGFGCTrap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6);
-VMMRCDECL(int) DBGFGCTrap03Handler(PVM pVM, PCPUMCTXCORE pRegFrame);
+VMMRCDECL(int) DBGFGCTrap01Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6);
+VMMRCDECL(int) DBGFGCTrap03Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame);
 /** @} */
 #endif
@@ -60,6 +60,6 @@
  * @{
  */
-VMMR0DECL(int) DBGFR0Trap01Handler(PVM pVM, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6);
-VMMR0DECL(int) DBGFR0Trap03Handler(PVM pVM, PCPUMCTXCORE pRegFrame);
+VMMR0DECL(int) DBGFR0Trap01Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6);
+VMMR0DECL(int) DBGFR0Trap03Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame);
 /** @} */
 #endif
@@ -124,11 +124,13 @@
 /** @} */
 
-VMMR3DECL(int)  DBGFR3AddrFromSelOff(PVM pVM, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off);
+VMMR3DECL(int)  DBGFR3AddrFromSelOff(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, RTSEL Sel, RTUINTPTR off);
 VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM, PDBGFADDRESS pAddress, RTGCUINTPTR FlatPtr);
-VMMR3DECL(void) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr);
+VMMR3DECL(PDBGFADDRESS) DBGFR3AddrFromPhys(PVM pVM, PDBGFADDRESS pAddress, RTGCPHYS PhysAddr);
 VMMR3DECL(bool) DBGFR3AddrIsValid(PVM pVM, PCDBGFADDRESS pAddress);
-VMMR3DECL(int)  DBGFR3AddrToPhys(PVMCPU pVCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys);
-VMMR3DECL(int)  DBGFR3AddrToHostPhys(PVMCPU pVCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys);
-VMMR3DECL(int)  DBGFR3AddrToVolatileR3Ptr(PVMCPU pVCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr);
+VMMR3DECL(int)  DBGFR3AddrToPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTGCPHYS pGCPhys);
+VMMR3DECL(int)  DBGFR3AddrToHostPhys(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, PRTHCPHYS pHCPhys);
+VMMR3DECL(int)  DBGFR3AddrToVolatileR3Ptr(PVM pVM, VMCPUID idCpu, PDBGFADDRESS pAddress, bool fReadOnly, void **ppvR3Ptr);
+VMMR3DECL(PDBGFADDRESS) DBGFR3AddrAdd(PDBGFADDRESS pAddress, RTGCUINTPTR uAddend);
+VMMR3DECL(PDBGFADDRESS) DBGFR3AddrSub(PDBGFADDRESS pAddress, RTGCUINTPTR uSubtrahend);
 
 
@@ -302,6 +304,6 @@
 VMMR3DECL(bool) DBGFR3CanWait(PVM pVM);
 VMMR3DECL(int)  DBGFR3Resume(PVM pVM);
-VMMR3DECL(int)  DBGFR3Step(PVM pVM);
-VMMR3DECL(int)  DBGFR3PrgStep(PVM pVM);
+VMMR3DECL(int)  DBGFR3Step(PVM pVM, VMCPUID idCpu);
+VMMR3DECL(int)  DBGFR3PrgStep(PVMCPU pVCpu);
 
 
@@ -388,5 +390,5 @@
 VMMR3DECL(int)  DBGFR3BpSet(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp);
 VMMR3DECL(int)  DBGFR3BpSetReg(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable,
-                                   uint8_t fType, uint8_t cb, PRTUINT piBp);
+                               uint8_t fType, uint8_t cb, PRTUINT piBp);
 VMMR3DECL(int)  DBGFR3BpSetREM(PVM pVM, PCDBGFADDRESS pAddress, uint64_t iHitTrigger, uint64_t iHitDisable, PRTUINT piBp);
 VMMR3DECL(int)  DBGFR3BpClear(PVM pVM, RTUINT iBp);
@@ -412,5 +414,5 @@
 VMMDECL(RTGCUINTREG)    DBGFBpGetDR2(PVM pVM);
 VMMDECL(RTGCUINTREG)    DBGFBpGetDR3(PVM pVM);
-VMMDECL(bool)           DBGFIsStepping(PVM pVM);
+VMMDECL(bool)           DBGFIsStepping(PVMCPU pVCpu);
 
 
@@ -778,4 +780,5 @@
  * All registers and data will be displayed. Addresses will be attempted resolved to symbols.
  */
+/** @todo SMP */
 #ifdef LOG_ENABLED
 # define DBGFR3DisasInstrCurrentLog(pVM, pszPrefix) \
@@ -805,9 +808,8 @@
 
 
-VMMR3DECL(int) DBGFR3MemScan(PVM pVM, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress);
-VMMR3DECL(int) DBGFR3MemRead(PVM pVM, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead);
-VMMR3DECL(int) DBGFR3MemReadString(PVM pVM, PCDBGFADDRESS pAddress, char *pszBuf, size_t cbBuf);
-VMMR3DECL(int) DBGFR3ReadGCVirt(PVM pVM, PVMCPU pVCpu, void *pvDst, RTGCPTR GCPtr, size_t cb);
-VMMR3DECL(int) DBGFR3WriteGCVirt(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtrDst, const void *pvSrc, size_t cb);
+VMMR3DECL(int) DBGFR3MemScan(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress);
+VMMR3DECL(int) DBGFR3MemRead(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void *pvBuf, size_t cbRead);
+VMMR3DECL(int) DBGFR3MemReadString(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, char *pszBuf, size_t cbBuf);
+VMMR3DECL(int) DBGFR3MemWrite(PVM pVM, VMCPUID idCpu, PCDBGFADDRESS pAddress, void const *pvBuf, size_t cbRead);
 
 
Index: trunk/include/VBox/pgm.h
===================================================================
--- trunk/include/VBox/pgm.h	(revision 19285)
+++ trunk/include/VBox/pgm.h	(revision 19286)
@@ -558,5 +558,5 @@
 VMMR3DECL(int)      PGMR3DbgWriteGCPtr(PVM pVM, RTGCPTR GCPtrDst, void const *pvSrc, size_t cb, uint32_t fFlags, size_t *pcbWritten);
 VMMR3DECL(int)      PGMR3DbgScanPhysical(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCPHYS pGCPhysHit);
-VMMR3DECL(int)      PGMR3DbgScanVirtual(PVM pVM, RTGCPTR GCPtr, RTGCPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPhysHit);
+VMMR3DECL(int)      PGMR3DbgScanVirtual(PVM pVM, PVMCPU pVCpu, RTGCPTR GCPtr, RTGCPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PRTGCUINTPTR pGCPhysHit);
 /** @} */
 #endif /* IN_RING3 */
Index: trunk/include/VBox/vm.h
===================================================================
--- trunk/include/VBox/vm.h	(revision 19285)
+++ trunk/include/VBox/vm.h	(revision 19286)
@@ -117,5 +117,52 @@
         char                padding[4096];      /* multiple of 64 */
     } cpum;
-    /** VMM part. */
+
+    /** PGM part. */
+    union
+    {
+#ifdef ___PGMInternal_h
+        struct PGMCPU       s;
+#endif
+        char                padding[32*1024];   /* multiple of 64 */
+    } pgm;
+
+    /** HWACCM part. */
+    union
+    {
+#ifdef ___HWACCMInternal_h
+        struct HWACCMCPU    s;
+#endif
+        char                padding[5120];      /* multiple of 64 */
+    } hwaccm;
+
+    /** EM part. */
+    union
+    {
+#ifdef ___EMInternal_h
+        struct EMCPU        s;
+#endif
+        char                padding[2048];      /* multiple of 64 */
+    } em;
+
+    /** TRPM part. */
+    union
+    {
+#ifdef ___TRPMInternal_h
+        struct TRPMCPU      s;
+#endif
+        char                padding[128];       /* multiple of 64 */
+    } trpm;
+
+    /** TM part. */
+    union
+    {
+#ifdef ___TMInternal_h
+        struct TMCPU        s;
+#endif
+        char                padding[64];        /* multiple of 64 */
+    } tm;
+
+    /** VMM part.
+     * @todo Combine this with other tiny structures. */
     union
     {
@@ -126,48 +173,14 @@
     } vmm;
 
-    /** PGM part. */
-    union
-    {
-#ifdef ___PGMInternal_h
-        struct PGMCPU       s;
-#endif
-        char                padding[32*1024];       /* multiple of 64 */
-    } pgm;
-
-    /** HWACCM part. */
-    union
-    {
-#ifdef ___HWACCMInternal_h
-        struct HWACCMCPU    s;
-#endif
-        char                padding[5120];      /* multiple of 64 */
-    } hwaccm;
-
-    /** EM part. */
-    union
-    {
-#ifdef ___EMInternal_h
-        struct EMCPU        s;
-#endif
-        char                padding[2048];        /* multiple of 64 */
-    } em;
-
-    /** TRPM part. */
-    union
-    {
-#ifdef ___TRPMInternal_h
-        struct TRPMCPU      s;
-#endif
-        char                padding[64];        /* multiple of 64 */
-    } trpm;
-
-    /** TM part. */
-    union
-    {
-#ifdef ___TMInternal_h
-        struct TMCPU        s;
-#endif
-        char                padding[64];        /* multiple of 64 */
-    } tm;
+    /** DBGF part.
+     * @todo Combine this with other tiny structures. */
+    union
+    {
+#ifdef ___DBGFInternal_h
+        struct DBGFCPU      s;
+#endif
+        uint8_t             padding[64];        /* multiple of 64 */
+    } dbgf;
+
 } VMCPU;
 
