ART: Fix 004-ReferenceMap run test
This patch adds a new option to ArtMethod::ToNativeQuickPc to select
the order of iteration over stack maps. The method is only used by
the runtime to find native_pc of catch blocks, but also by the
004-ReferenceMap test which uses it to find native_pc of a safepoint.
Change-Id: Idb2b34aabf1ac7249c30a00806af7d63d7e682dd
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index b9d76b4..c905b63 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -97,7 +97,8 @@
if (found_dex_pc != DexFile::kDexNoIndex) {
exception_handler_->SetHandlerMethod(method);
exception_handler_->SetHandlerDexPc(found_dex_pc);
- exception_handler_->SetHandlerQuickFramePc(method->ToNativeQuickPc(found_dex_pc));
+ exception_handler_->SetHandlerQuickFramePc(
+ method->ToNativeQuickPc(found_dex_pc, /* is_catch_handler */ true));
exception_handler_->SetHandlerQuickFrame(GetCurrentQuickFrame());
return false; // End stack walk.
}