Add more logging for b/64759619
Aim to get more info about methods that don't have a resolved
declaring class.
Test: test-art-host
Bug: 64759619
(cherry picked from commit 26c5f9dd5a11012af3327ef3309890f40cb222b0)
Change-Id: I6a2b4b4f1db8cc7771d76deed96dd7f598cd1fdd
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index d22482f..f95b493 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -7951,7 +7951,8 @@
// We have a valid method from the DexCache but we need to perform ICCE and IAE checks.
DCHECK(resolved->GetDeclaringClassUnchecked() != nullptr) << resolved->GetDexMethodIndex();
klass = LookupResolvedType(dex_file, method_id.class_idx_, dex_cache.Get(), class_loader.Get());
- DCHECK(klass != nullptr);
+ CHECK(klass != nullptr) << resolved->PrettyMethod() << " " << resolved << " "
+ << resolved->GetAccessFlags();
} else {
// The method was not in the DexCache, resolve the declaring class.
klass = ResolveType(dex_file, method_id.class_idx_, dex_cache, class_loader);