Jit: MethodTrace + Jit fix

Add checks for debug & trace mode to avoid re-entering Jit'd code.
This is the conversative solution - we'll eventually want the Jit
to integrate support for tracing and debug into Jit'd code.
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index bfda671..8b30bd6 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -1217,25 +1217,21 @@
          interpState->pc,
          interpState->method->name);
 #endif
-
 #if INTERP_TYPE == INTERP_DBG
-    /* Check to see if we've got a trace selection request.  If we do,
-     * but something is amiss, revert to the fast interpreter.
-     */
-#if !defined(WITH_SELF_VERIFICATION)
-    if (dvmJitCheckTraceRequest(self,interpState)) {
+    /* Check to see if we've got a trace selection request. */
+    if (
+#if defined(WITH_SELF_VERIFICATION)
+         (interpState->jitState != kJitSelfVerification) &&
+#endif
+         !gDvm.debuggerActive &&
+#if defined(WITH_PROFILER)
+         (gDvm.activeProfilers == 0) &&
+#endif
+         dvmJitCheckTraceRequest(self, interpState)) {
         interpState->nextMode = INTERP_STD;
-        //LOGD("** something wrong, exiting\n");
+        //LOGD("Invalid trace request, exiting\n");
         return true;
     }
-#else
-    if (interpState->jitState != kJitSelfVerification &&
-        dvmJitCheckTraceRequest(self,interpState)) {
-        interpState->nextMode = INTERP_STD;
-        //LOGD("** something wrong, exiting\n");
-        return true;
-    }
-#endif /* WITH_SELF_VERIFICATION */
 #endif /* INTERP_TYPE == INTERP_DBG */
 #endif /* WITH_JIT */