summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-06-05 17:42:53 -0700
committerMathieu Chartier <mathieuc@google.com>2014-06-06 13:12:17 -0700
commit61c5ebc6aee2cac1c363de6fbdac25ada1697fdb (patch)
tree444936c3e3718b692ba7f1981b863190f26b4ed7 /oatdump
parent25c4f6a25b3de9b9d7ca5162f1629753a0b7f003 (diff)
downloadart-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.zip
art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.gz
art-61c5ebc6aee2cac1c363de6fbdac25ada1697fdb.tar.bz2
Change FieldHelper to use a handle.
Fixed compaction bugs related to FieldHelper::GetType in: artSet32InstanceFromCode SetFieldValueImpl CheckReceiver Field_set interpreter::DoFieldPut MethodVerifier::VerifyISGet MethodVerifier::VerifyISPut MethodVerifier::VerifyIGetQuick Bug: 13077697 Change-Id: I7de9ded2893b5568d43e4daa86fd135bf5508b72
Diffstat (limited to 'oatdump')
-rw-r--r--oatdump/oatdump.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 183f667..d51179e 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -919,10 +919,11 @@ class ImageDumper {
static void PrintField(std::ostream& os, mirror::ArtField* field, mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- FieldHelper fh(field);
- const char* descriptor = fh.GetTypeDescriptor();
- os << StringPrintf("%s: ", fh.GetName());
+ const char* descriptor = field->GetTypeDescriptor();
+ os << StringPrintf("%s: ", field->GetName());
if (descriptor[0] != 'L' && descriptor[0] != '[') {
+ StackHandleScope<1> hs(Thread::Current());
+ FieldHelper fh(hs.NewHandle(field));
mirror::Class* type = fh.GetType();
if (type->IsPrimitiveLong()) {
os << StringPrintf("%" PRId64 " (0x%" PRIx64 ")\n", field->Get64(obj), field->Get64(obj));
@@ -942,6 +943,8 @@ class ImageDumper {
os << StringPrintf("null %s\n", PrettyDescriptor(descriptor).c_str());
} else {
// Grab the field type without causing resolution.
+ StackHandleScope<1> hs(Thread::Current());
+ FieldHelper fh(hs.NewHandle(field));
mirror::Class* field_type = fh.GetType(false);
if (field_type != NULL) {
PrettyObjectValue(os, field_type, value);