summaryrefslogtreecommitdiffstats
path: root/vm/interp/Interp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/interp/Interp.cpp')
-rw-r--r--vm/interp/Interp.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/vm/interp/Interp.cpp b/vm/interp/Interp.cpp
index 41097644f..c57ea672a 100644
--- a/vm/interp/Interp.cpp
+++ b/vm/interp/Interp.cpp
@@ -766,7 +766,9 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
if (pCtrl->active && pCtrl->thread == self) {
int frameDepth;
bool doStop = false;
+#ifndef LOG_NDEBUG
const char* msg = NULL;
+#endif
assert(!dvmIsNativeMethod(method));
@@ -778,14 +780,20 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
*/
if (pCtrl->method != method) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "new method";
+#endif
} else if (pCtrl->size == SS_MIN) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "new instruction";
+#endif
} else if (!dvmAddressSetGet(
pCtrl->pAddressSet, pc - method->insns)) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "new line";
+#endif
}
} else if (pCtrl->depth == SD_OVER) {
/*
@@ -799,16 +807,22 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
if (frameDepth < pCtrl->frameDepth) {
/* popped up one or more frames, always trigger */
doStop = true;
+#ifndef LOG_NDEBUG
msg = "method pop";
+#endif
} else if (frameDepth == pCtrl->frameDepth) {
/* same depth, see if we moved */
if (pCtrl->size == SS_MIN) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "new instruction";
+#endif
} else if (!dvmAddressSetGet(pCtrl->pAddressSet,
pc - method->insns)) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "new line";
+#endif
}
}
} else {
@@ -824,7 +838,9 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp,
frameDepth = dvmComputeVagueFrameDepth(self, fp);
if (frameDepth < pCtrl->frameDepth) {
doStop = true;
+#ifndef LOG_NDEBUG
msg = "method pop";
+#endif
}
}
@@ -1457,7 +1473,7 @@ void dvmThrowVerificationError(const Method* method, int kind, int ref)
case VERIFY_ERROR_NONE:
/* should never happen; use default exception */
assert(false);
- msg = strdup("weird - no error specified");
+ msg = "weird - no error specified";
break;
/* no default clause -- want warning if enum updated */