summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2015-11-17 10:35:39 +0100
committer Sebastien Hertz <shertz@google.com> 2015-11-17 11:04:45 +0100
commit09687447764a4d5d810df3d02532e4b141e7f2cd (patch)
tree4bd0305123a148911e15ca13fbaeb5380356de60 /runtime/stack.cc
parent55a77ef5f99c2b056eb5f2820c1ff3b29c0ec270 (diff)
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
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index d7edfade15..0751f64b06 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -265,7 +265,12 @@ bool StackVisitor::GetVReg(ArtMethod* m, uint16_t vreg, VRegKind kind, uint32_t*
}
} 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;
}
}