Fix StackVisitor::GetVReg for reference in shadow frame
Also fixes 457-regs run-test that used to pass an incorrect
vreg kind.
Bug: 25428216
Change-Id: Ic31b51ca0f72350db6325f23087b06e93055d750
diff --git a/runtime/stack.cc b/runtime/stack.cc
index d7edfad..0751f64 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -265,7 +265,12 @@
}
} else {
DCHECK(cur_shadow_frame_ != nullptr);
- *val = cur_shadow_frame_->GetVReg(vreg);
+ if (kind == kReferenceVReg) {
+ *val = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(
+ cur_shadow_frame_->GetVRegReference(vreg)));
+ } else {
+ *val = cur_shadow_frame_->GetVReg(vreg);
+ }
return true;
}
}