diff options
Diffstat (limited to 'runtime/reference_table.cc')
-rw-r--r-- | runtime/reference_table.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/reference_table.cc b/runtime/reference_table.cc index f04d41dc80..0be79efb76 100644 --- a/runtime/reference_table.cc +++ b/runtime/reference_table.cc @@ -192,6 +192,13 @@ void ReferenceTable::Dump(std::ostream& os, Table& entries) { } else { StringAppendF(&extras, " \"%.16s... (%d chars)", utf8.c_str(), s->GetLength()); } + } else if (ref->IsReferenceInstance()) { + mirror::Object* referent = ref->AsReference()->GetReferent(); + if (referent == nullptr) { + extras = " (referent is null)"; + } else { + extras = StringPrintf(" (referent is a %s)", PrettyTypeOf(referent).c_str()); + } } os << StringPrintf(" %5d: ", idx) << ref << " " << className << extras << "\n"; } |