diff options
author | 2019-10-07 13:51:13 +0000 | |
---|---|---|
committer | 2019-10-07 18:59:55 +0000 | |
commit | 55eccdf61f46bd2a633f489f8d09cf78e1de1938 (patch) | |
tree | e60d91c8fc48dfe70956ec9febd346b9dc9fcf77 /runtime/debugger.cc | |
parent | 49df715faf3700e874fbe246b339a8e426549216 (diff) |
Revert^4 "Walk internal ArtField/ArtMethod pointers"
Several of the new tests make use of the invoke-custom opcode. This
opcode is not supported by dexter/slicer causing the tests to fail.
This reverts commit c34eab45161c51bf63e548e44645cbcc59d01268.
Reason for revert: Added tests to redefine-stress known failures
Test: ./test.py --host --redefine-stress
Bug: 134162467
Change-Id: Ic1b375a0cb1e44d0252c17115af92c269fb8efc5
Diffstat (limited to 'runtime/debugger.cc')
-rw-r--r-- | runtime/debugger.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 4cc3583496..b28868fb7b 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -71,6 +71,8 @@ #include "oat_file.h" #include "obj_ptr-inl.h" #include "reflection.h" +#include "reflective_handle.h" +#include "reflective_handle_scope-inl.h" #include "runtime-inl.h" #include "scoped_thread_state_change-inl.h" #include "stack.h" @@ -4056,18 +4058,19 @@ void Dbg::ExecuteMethodWithoutPendingException(ScopedObjectAccess& soa, DebugInv soa.Self()->AssertNoPendingException(); // Translate the method through the vtable, unless the debugger wants to suppress it. - ArtMethod* m = pReq->method; + StackArtMethodHandleScope<2> rhs(soa.Self()); + MutableReflectiveHandle<ArtMethod> m(rhs.NewHandle(pReq->method)); PointerSize image_pointer_size = Runtime::Current()->GetClassLinker()->GetImagePointerSize(); if ((pReq->options & JDWP::INVOKE_NONVIRTUAL) == 0 && pReq->receiver.Read() != nullptr) { - ArtMethod* actual_method = - pReq->klass.Read()->FindVirtualMethodForVirtualOrInterface(m, image_pointer_size); - if (actual_method != m) { - VLOG(jdwp) << "ExecuteMethod translated " << ArtMethod::PrettyMethod(m) - << " to " << ArtMethod::PrettyMethod(actual_method); + MutableReflectiveHandle<ArtMethod> actual_method(rhs.NewHandle( + pReq->klass.Read()->FindVirtualMethodForVirtualOrInterface(m.Get(), image_pointer_size))); + if (actual_method.Get() != m.Get()) { + VLOG(jdwp) << "ExecuteMethod translated " << m->PrettyMethod() + << " to " << actual_method->PrettyMethod(); m = actual_method; } } - VLOG(jdwp) << "ExecuteMethod " << ArtMethod::PrettyMethod(m) + VLOG(jdwp) << "ExecuteMethod " << m->PrettyMethod() << " receiver=" << pReq->receiver.Read() << " arg_count=" << pReq->arg_count; CHECK(m != nullptr); |