Stay in the dbg interpreter if the entry reason is to deal with exceptions.
Bug: 2487514
Change-Id: Id1eb91f347ff772714d9560370b9994f46d3c5cb
diff --git a/vm/mterp/out/InterpC-portdbg.c b/vm/mterp/out/InterpC-portdbg.c
index de2c006..fbb06bf 100644
--- a/vm/mterp/out/InterpC-portdbg.c
+++ b/vm/mterp/out/InterpC-portdbg.c
@@ -1484,6 +1484,11 @@
#if defined(WITH_SELF_VERIFICATION)
(interpState->jitState != kJitSelfVerification) &&
#endif
+ /*
+ * Don't bail out of the dbg interpreter if the entry reason is to
+ * deal with a thrown exception.
+ */
+ (interpState->entryPoint != kInterpEntryThrow) &&
!gDvm.debuggerActive &&
#if defined(WITH_PROFILER)
(gDvm.activeProfilers == 0) &&
diff --git a/vm/mterp/out/InterpC-portstd.c b/vm/mterp/out/InterpC-portstd.c
index 2d1ba8c..a0bc17e 100644
--- a/vm/mterp/out/InterpC-portstd.c
+++ b/vm/mterp/out/InterpC-portstd.c
@@ -1223,6 +1223,11 @@
#if defined(WITH_SELF_VERIFICATION)
(interpState->jitState != kJitSelfVerification) &&
#endif
+ /*
+ * Don't bail out of the dbg interpreter if the entry reason is to
+ * deal with a thrown exception.
+ */
+ (interpState->entryPoint != kInterpEntryThrow) &&
!gDvm.debuggerActive &&
#if defined(WITH_PROFILER)
(gDvm.activeProfilers == 0) &&
diff --git a/vm/mterp/portable/entry.c b/vm/mterp/portable/entry.c
index 8ea4bdc..6789450 100644
--- a/vm/mterp/portable/entry.c
+++ b/vm/mterp/portable/entry.c
@@ -48,6 +48,11 @@
#if defined(WITH_SELF_VERIFICATION)
(interpState->jitState != kJitSelfVerification) &&
#endif
+ /*
+ * Don't bail out of the dbg interpreter if the entry reason is to
+ * deal with a thrown exception.
+ */
+ (interpState->entryPoint != kInterpEntryThrow) &&
!gDvm.debuggerActive &&
#if defined(WITH_PROFILER)
(gDvm.activeProfilers == 0) &&