Index: trunk/include/VBox/vmm/pdmdev.h
===================================================================
--- trunk/include/VBox/vmm/pdmdev.h	(revision 37375)
+++ trunk/include/VBox/vmm/pdmdev.h	(revision 37410)
@@ -2708,4 +2708,15 @@
 
     /**
+     * Gets the trace buffer handle.
+     *
+     * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
+     * really inteded for direct usage, thus no inline wrapper function.
+     *
+     * @returns Trace buffer handle or NIL_RTTRACEBUF.
+     * @param   pDevIns             The device instance.
+     */
+    DECLR3CALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
+
+    /**
      * Registers a statistics sample if statistics are enabled.
      *
@@ -3558,4 +3569,15 @@
     DECLRCCALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
 
+    /**
+     * Gets the trace buffer handle.
+     *
+     * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
+     * really inteded for direct usage, thus no inline wrapper function.
+     *
+     * @returns Trace buffer handle or NIL_RTTRACEBUF.
+     * @param   pDevIns             The device instance.
+     */
+    DECLRCCALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
+
     /** Just a safety precaution. */
     uint32_t                        u32TheEnd;
@@ -3745,4 +3767,15 @@
      */
     DECLR0CALLBACKMEMBER(uint64_t, pfnTMTimeVirtGetNano,(PPDMDEVINS pDevIns));
+
+    /**
+     * Gets the trace buffer handle.
+     *
+     * This is used by the macros found in VBox/vmm/dbgftrace.h and is not
+     * really inteded for direct usage, thus no inline wrapper function.
+     *
+     * @returns Trace buffer handle or NIL_RTTRACEBUF.
+     * @param   pDevIns             The device instance.
+     */
+    DECLR0CALLBACKMEMBER(RTTRACEBUF, pfnDBGFTraceBuf,(PPDMDEVINS pDevIns));
 
     /** Just a safety precaution. */
Index: trunk/include/VBox/vmm/vm.h
===================================================================
--- trunk/include/VBox/vmm/vm.h	(revision 37375)
+++ trunk/include/VBox/vmm/vm.h	(revision 37410)
@@ -4,5 +4,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2011 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -850,10 +850,18 @@
     /** @} */
 
-
-    /* padding to make gnuc put the StatQemuToGC where msc does. */
-#if HC_ARCH_BITS == 32
-    uint32_t                    padding0;
-#endif
-
+    /** @name Debugging
+     * @{ */
+    /** Raw-mode Context VM Pointer. */
+    RCPTRTYPE(RTTRACEBUF)       hTraceBufRC;
+    /** Alignment padding */
+    uint32_t                    uPadding3;
+    /** Ring-3 Host Context VM Pointer. */
+    R3PTRTYPE(RTTRACEBUF)       hTraceBufR3;
+    /** Ring-0 Host Context VM Pointer. */
+    R0PTRTYPE(RTTRACEBUF)       hTraceBufR0;
+    /** @} */
+
+    /** @name Switcher statistics (remove)
+     * @{ */
     /** Profiling the total time from Qemu to GC. */
     STAMPROFILEADV              StatTotalQemuToGC;
@@ -879,8 +887,11 @@
     STAMPROFILEADV              StatSwitcherLldt;
     STAMPROFILEADV              StatSwitcherTSS;
-
+    /** @} */
+
+#if HC_ARCH_BITS != 64
     /** Padding - the unions must be aligned on a 64 bytes boundary and the unions
      *  must start at the same offset on both 64-bit and 32-bit hosts. */
-    uint8_t                     abAlignment1[HC_ARCH_BITS == 32 ? 48 : 24];
+    uint8_t                     abAlignment1[HC_ARCH_BITS == 32 ? 36 : 0];
+#endif
 
     /** CPUM part. */
@@ -1085,2 +1096,3 @@
 
 #endif
+
Index: trunk/include/VBox/vmm/vm.mac
===================================================================
--- trunk/include/VBox/vmm/vm.mac	(revision 37375)
+++ trunk/include/VBox/vmm/vm.mac	(revision 37410)
@@ -4,5 +4,5 @@
 
 ;
-; Copyright (C) 2006-2010 Oracle Corporation
+; Copyright (C) 2006-2011 Oracle Corporation
 ;
 ; This file is part of VirtualBox Open Source Edition (OSE), as
@@ -24,6 +24,6 @@
 ;
 
-%ifndef ___VBox_vmm_vm_mac__
-%define ___VBox_vmm_vm_mac__
+%ifndef ___VBox_vmm_vm_mac
+%define ___VBox_vmm_vm_mac
 
 %include "VBox/vmm/stam.mac"
@@ -73,4 +73,9 @@
     .fUseLargePages         resb 1
 
+    .hTraceBufRC            RTRCPTR_RES 1
+    .uPadding3              resd 1
+    .hTraceBufR3            RTR3PTR_RES 1
+    .hTraceBufR0            RTR0PTR_RES 1
+
     alignb 8
 
@@ -99,5 +104,5 @@
     .abAlignment1           resb 48
 %else
-    .abAlignment1           resb 24
+;    .abAlignment1           resb 0
 %endif
 
@@ -136,2 +141,3 @@
 
 %endif
+
