summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_switch_impl.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2017-08-23 12:54:53 -0700
committer Alex Light <allight@google.com> 2017-09-01 10:10:14 -0700
commit798eab03120f6189e8f6aa804d67af1b1d9f00b0 (patch)
tree828a9a896619a8575bcf20a078f193df54354899 /runtime/interpreter/interpreter_switch_impl.cc
parent9c4feaa082d8e8c00611a0657c3f80b1c1179a6f (diff)
JVMTI Exception and ExceptionCatch events
Add support for the JVMTI can_generate_exception_events capability. This includes the Exception and ExceptionCatch events and all their associated behaviors. Test: ./test.py --host -j50 Bug: 62821960 Bug: 65049545 Change-Id: I21cc8522c01033cdeb47bf34fa433bf04bf7ca5c
Diffstat (limited to 'runtime/interpreter/interpreter_switch_impl.cc')
-rw-r--r--runtime/interpreter/interpreter_switch_impl.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/interpreter/interpreter_switch_impl.cc b/runtime/interpreter/interpreter_switch_impl.cc
index f352960204..69e091b42d 100644
--- a/runtime/interpreter/interpreter_switch_impl.cc
+++ b/runtime/interpreter/interpreter_switch_impl.cc
@@ -30,10 +30,7 @@ namespace interpreter {
do { \
DCHECK(self->IsExceptionPending()); \
self->AllowThreadSuspension(); \
- uint32_t found_dex_pc = FindNextInstructionFollowingException(self, shadow_frame, \
- inst->GetDexPc(insns), \
- instr); \
- if (found_dex_pc == DexFile::kDexNoIndex) { \
+ if (!MoveToExceptionHandler(self, shadow_frame, instr)) { \
/* Structured locking is to be enforced for abnormal termination, too. */ \
DoMonitorCheckOnExit<do_assignability_check>(self, &shadow_frame); \
if (interpret_one_instruction) { \
@@ -42,7 +39,8 @@ namespace interpreter {
} \
return JValue(); /* Handled in caller. */ \
} else { \
- int32_t displacement = static_cast<int32_t>(found_dex_pc) - static_cast<int32_t>(dex_pc); \
+ int32_t displacement = \
+ static_cast<int32_t>(shadow_frame.GetDexPC()) - static_cast<int32_t>(dex_pc); \
inst = inst->RelativeAt(displacement); \
} \
} while (false)