Index: /trunk/src/recompiler_new/Makefile.kmk
===================================================================
--- /trunk/src/recompiler_new/Makefile.kmk	(revision 16055)
+++ /trunk/src/recompiler_new/Makefile.kmk	(revision 16056)
@@ -110,4 +110,5 @@
 $(REM_MOD)_DEFS           += VBOX_WITH_NEW_RECOMPILER
 #$(REM_MOD)_DEFS           += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB  # Enables huge amounts of debug logging.
+#$(REM_MOD)_DEFS           += DEBUG_TMP_LOGGING # log qemu parts to "/tmp/vbox-qemu.log" - does not work with VBoxREM2.
 $(REM_MOD)_DEFS.linux      = _GNU_SOURCE
 ifdef VBOX_SOLARIS_10
@@ -125,4 +126,8 @@
 	$(PATH_ROOT)/src/VBox/VMM 	\
 	.
+ifn1of ($($(REM_MOD)_DEFS),DEBUG_TMP_LOGGING)
+$(REM_MOD)_INCS           <= \
+	Sun/crt
+endif
 
 $(REM_MOD)_SOURCES         = 		\
Index: /trunk/src/recompiler_new/Sun/crt/stdio.h
===================================================================
--- /trunk/src/recompiler_new/Sun/crt/stdio.h	(revision 16055)
+++ /trunk/src/recompiler_new/Sun/crt/stdio.h	(revision 16056)
@@ -68,4 +68,7 @@
 #define fprintf(logfile, ...)   LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
 
+#ifdef DEBUG_TMP_LOGGING
+# error "DEBUG_TMP_LOGGING doesn't work with the Sun/crt/stdio.h wrapper."
+#endif
 
 __END_DECLS
Index: /trunk/src/recompiler_new/VBoxRecompiler.c
===================================================================
--- /trunk/src/recompiler_new/VBoxRecompiler.c	(revision 16055)
+++ /trunk/src/recompiler_new/VBoxRecompiler.c	(revision 16056)
@@ -390,5 +390,7 @@
 #ifdef DEBUG_ALL_LOGGING
     loglevel = ~0;
+# ifdef DEBUG_TMP_LOGGING
     logfile = fopen("/tmp/vbox-qemu.log", "w");
+# endif
 #endif
 
@@ -2974,6 +2976,6 @@
  * @param   pTLBEntry   The TLB entry.
  */
-target_ulong remR3PhysGetPhysicalAddressCode(CPUState*          env, 
-                                             target_ulong       addr, 
+target_ulong remR3PhysGetPhysicalAddressCode(CPUState*          env,
+                                             target_ulong       addr,
                                              CPUTLBEntry*       pTLBEntry,
                                              target_phys_addr_t ioTLBEntry)
@@ -2983,6 +2985,6 @@
     if ((ioTLBEntry & ~TARGET_PAGE_MASK) == pVM->rem.s.iHandlerMemType)
     {
-        /* If code memory is being monitored, appropriate IOTLB entry will have 
-           handler IO type, and addend will provide real physical address, no 
+        /* If code memory is being monitored, appropriate IOTLB entry will have
+           handler IO type, and addend will provide real physical address, no
            matter if we store VA in TLB or not, as handlers are always passed PA */
         target_ulong ret = (ioTLBEntry & TARGET_PAGE_MASK) + addr;
@@ -3677,8 +3679,8 @@
 void disas(FILE *phFile, void *pvCode, unsigned long cb)
 {
-#ifdef DEBUG_ALL_LOGGING
-#define DISAS_PRINTF(x...) fprintf(phFile, x)
+#ifdef DEBUG_TMP_LOGGING
+# define DISAS_PRINTF(x...) fprintf(phFile, x)
 #else
-#define DISAS_PRINTF(x...) RTLogPrintf(x)
+# define DISAS_PRINTF(x...) RTLogPrintf(x)
     if (LogIs2Enabled())
 #endif
@@ -3727,8 +3729,8 @@
 void target_disas(FILE *phFile, target_ulong uCode, target_ulong cb, int fFlags)
 {
-#ifdef DEBUG_ALL_LOGGING
-#define DISAS_PRINTF(x...) fprintf(phFile, x)
+#ifdef DEBUG_TMP_LOGGING
+# define DISAS_PRINTF(x...) fprintf(phFile, x)
 #else
-#define DISAS_PRINTF(x...) RTLogPrintf(x)
+# define DISAS_PRINTF(x...) RTLogPrintf(x)
     if (LogIs2Enabled())
 #endif
Index: /trunk/src/recompiler_new/osdep.h
===================================================================
--- /trunk/src/recompiler_new/osdep.h	(revision 16055)
+++ /trunk/src/recompiler_new/osdep.h	(revision 16056)
@@ -37,7 +37,7 @@
 #define fflush(file)            RTLogFlush(NULL)
 #define printf(...)             LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
-/* If DEBUG_ALL_LOGGING - goes to QEMU log file */
-#ifndef DEBUG_ALL_LOGGING
- #define fprintf(logfile, ...)   LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
+/* If DEBUG_TMP_LOGGING - goes to QEMU log file */
+#ifndef DEBUG_TMP_LOGGING
+# define fprintf(logfile, ...)  LogIt(LOG_INSTANCE, 0, LOG_GROUP_REM_PRINTF, (__VA_ARGS__))
 #endif
 
@@ -126,5 +126,5 @@
 #ifdef _MSC_VER
 /** @todo: maybe wrong, or slow */
-#define REGPARM 
+#define REGPARM
 #else
 #define REGPARM __attribute((regparm(3)))
@@ -165,5 +165,5 @@
 #ifdef _MSC_VER
 #define ALIGNED_MEMBER(type, name, bytes) type name
-#define ALIGNED_MEMBER_DEF(type, name) type name  
+#define ALIGNED_MEMBER_DEF(type, name) type name
 #define PACKED_STRUCT(name) struct name
 #define REGISTER_BOUND_GLOBAL(type, var, reg) type var
