Debugger: Fix handling of contained type attribute.

The DIEs generated by gcc sometimes pass a modified type for
DIEPointerToMember's containing type. As such, we need to resolve
the passed in type down to its base type before verifying that it's
indeed a compound type.
This commit is contained in:
Rene Gollent
2013-07-18 21:37:02 -04:00
parent fe07d32c75
commit 2fab6ab728
+6 -1
View File
@@ -1431,7 +1431,12 @@ status_t
DIEPointerToMemberType::AddAttribute_containing_type(uint16 attributeName,
const AttributeValue& value)
{
fContainingType = dynamic_cast<DIECompoundType*>(value.reference);
DebugInfoEntry* type = value.reference;
DIEModifiedType* modifiedType;
while ((modifiedType = dynamic_cast<DIEModifiedType*>(type)) != NULL)
type = modifiedType->GetType();
fContainingType = dynamic_cast<DIECompoundType*>(type);
return fContainingType != NULL ? B_OK : B_BAD_DATA;
}