Sanity check the data I am going to read from the extractor to avoid asserting.

llvm-svn: 147214
This commit is contained in:
Jim Ingham
2011-12-23 00:57:42 +00:00
parent 3f0b90dcd0
commit 6aa664641e

View File

@@ -915,8 +915,14 @@ ABISysV_x86_64::GetReturnValueObjectImpl (Thread &thread,
}
}
}
// These two tests are just sanity checks. If I somehow get the
// type calculation wrong above it is better to just return nothing
// than to assert or crash.
if (!copy_from_extractor)
return return_valobj_sp;
if (copy_from_offset + field_byte_width > copy_from_extractor->GetByteSize())
return return_valobj_sp;
copy_from_extractor->CopyByteOrderedData (copy_from_offset,
field_byte_width,