summaryrefslogtreecommitdiffstats
path: root/runtime/debugger.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-03-20 09:57:40 +0100
committerSebastien Hertz <shertz@google.com>2014-03-20 09:57:40 +0100
commit83a47d8a950867da833dfb5c3d8ddfb3d87a8cfe (patch)
tree4d5699876abc9abbed3b89725fd6e97061de1e9e /runtime/debugger.cc
parent0d9c02e661813abdf18b4e7544e204d2da719d20 (diff)
downloadart-83a47d8a950867da833dfb5c3d8ddfb3d87a8cfe.tar.gz
art-83a47d8a950867da833dfb5c3d8ddfb3d87a8cfe.tar.bz2
art-83a47d8a950867da833dfb5c3d8ddfb3d87a8cfe.zip
Fix JDWP ObjectReference.InvokeMethod for virtual method call.
Fixes virtual method call by invoking the concrete method in sirt reference after devirtualization, not the original method. Bug: 13526099 Change-Id: I2e3548eca2f5434e8cece64c22aaf80d1cd8badf
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r--runtime/debugger.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 2c671aa4e2..036b0c50ee 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -3071,7 +3071,7 @@ void Dbg::ExecuteMethod(DebugInvokeReq* pReq) {
// Translate the method through the vtable, unless the debugger wants to suppress it.
SirtRef<mirror::ArtMethod> m(soa.Self(), pReq->method);
if ((pReq->options & JDWP::INVOKE_NONVIRTUAL) == 0 && pReq->receiver != NULL) {
- mirror::ArtMethod* actual_method = pReq->klass->FindVirtualMethodForVirtualOrInterface(pReq->method);
+ mirror::ArtMethod* actual_method = pReq->klass->FindVirtualMethodForVirtualOrInterface(m.get());
if (actual_method != m.get()) {
VLOG(jdwp) << "ExecuteMethod translated " << PrettyMethod(m.get()) << " to " << PrettyMethod(actual_method);
m.reset(actual_method);
@@ -3084,7 +3084,7 @@ void Dbg::ExecuteMethod(DebugInvokeReq* pReq) {
CHECK_EQ(sizeof(jvalue), sizeof(uint64_t));
- pReq->result_value = InvokeWithJValues(soa, pReq->receiver, soa.EncodeMethod(pReq->method),
+ pReq->result_value = InvokeWithJValues(soa, pReq->receiver, soa.EncodeMethod(m.get()),
reinterpret_cast<jvalue*>(pReq->arg_values));
mirror::Throwable* exception = soa.Self()->GetException(NULL);